summaryrefslogtreecommitdiff
path: root/doc/ci/examples/test-clojure-application.md
diff options
context:
space:
mode:
authorKamil Trzciński <ayufan@ayufan.eu>2015-09-16 11:57:40 +0000
committerKamil Trzciński <ayufan@ayufan.eu>2015-09-16 11:57:40 +0000
commitcccd269da3f5d82c5d14289980d9b52c9cad08db (patch)
tree2947658dfff44a3873f7d350f0353dbdb7b9b541 /doc/ci/examples/test-clojure-application.md
parent7d59ba00b9aa1a8be28f1b7ccaa1c628be90aabb (diff)
parentac8d2eb065e9522679d4eae4649c6815daa5460c (diff)
downloadgitlab-ce-cccd269da3f5d82c5d14289980d9b52c9cad08db.tar.gz
Merge branch 'ci-and-ce-sitting-in-a-tree-k-i-s-s-i-n-g' into 'master'
Merge CI into CE First step of #2164. - [x] Merge latest CE master - [x] Make application start - [x] Re-use gitlab sessions (remove CI oauth part) - [x] Get rid of gitlab_ci.yml config - [x] Make tests start - [x] Make most CI features works - [x] Make tests green - [x] Write migration documentation - [x] Add CI builds to CE backup See merge request !1204
Diffstat (limited to 'doc/ci/examples/test-clojure-application.md')
-rw-r--r--doc/ci/examples/test-clojure-application.md35
1 files changed, 35 insertions, 0 deletions
diff --git a/doc/ci/examples/test-clojure-application.md b/doc/ci/examples/test-clojure-application.md
new file mode 100644
index 00000000000..eaee94a10f1
--- /dev/null
+++ b/doc/ci/examples/test-clojure-application.md
@@ -0,0 +1,35 @@
+## Test Clojure applications
+
+This example will guide you how to run tests in your Clojure application.
+
+You can checkout the example [source](https://gitlab.com/dzaporozhets/clojure-web-application) and check [CI status](https://ci.gitlab.com/projects/6306).
+
+### Configure project
+
+This is what the `.gitlab-ci.yml` file looks like for this project:
+
+```yaml
+variables:
+ POSTGRES_DB: sample-test
+ DATABASE_URL: "postgresql://postgres@postgres:5432/sample-test"
+
+before_script:
+ - apt-get update -y
+ - apt-get install default-jre postgresql-client -y
+ - wget https://raw.githubusercontent.com/technomancy/leiningen/stable/bin/lein
+ - chmod a+x lein
+ - export LEIN_ROOT=1
+ - PATH=$PATH:.
+ - lein deps
+ - lein migratus migrate
+
+test:
+ script:
+ - lein test
+```
+
+In before script we install JRE and [Leiningen](http://leiningen.org/).
+Sample project uses [migratus](https://github.com/yogthos/migratus) library to manage database migrations.
+So we added database migration as last step of `before_script` section
+
+You can use public runners available on `gitlab.com` for testing your application with such configuration.