diff options
-rw-r--r-- | doc/README.md | 3 | ||||
-rw-r--r-- | doc/examples/README.md | 1 | ||||
-rw-r--r-- | doc/examples/test-clojure-application.md | 35 |
3 files changed, 38 insertions, 1 deletions
diff --git a/doc/README.md b/doc/README.md index 0a84103..e3534c6 100644 --- a/doc/README.md +++ b/doc/README.md @@ -14,6 +14,7 @@ + [Test and deploy Ruby applications to Heroku](examples/test-and-deploy-ruby-application-to-heroku.md) + [Test and deploy Python applications to Heroku](examples/test-and-deploy-python-application-to-heroku.md) ++ [Test Clojure applications](examples/test-clojure-application.md) + Help your favorite programming language and GitLab by sending a merge request with a guide for that language. ### Administrator documentation @@ -23,4 +24,4 @@ + [User permissions](permissions/README.md) + [Backup/Restore](raketasks/backup_restore.md) + [Migrating to packaged CI](migration_to_omnibus/README.md) -+ [API](api/README.md)
\ No newline at end of file ++ [API](api/README.md) diff --git a/doc/examples/README.md b/doc/examples/README.md index 78dc1e0..e0b9fa0 100644 --- a/doc/examples/README.md +++ b/doc/examples/README.md @@ -2,3 +2,4 @@ + [Test and deploy Ruby Application to Heroku](test-and-deploy-ruby-application-to-heroku.md) + [Test and deploy Python Application to Heroku](test-and-deploy-python-application-to-heroku.md) ++ [Test Clojure applications](examples/test-clojure-application.md) diff --git a/doc/examples/test-clojure-application.md b/doc/examples/test-clojure-application.md new file mode 100644 index 0000000..6c6faf8 --- /dev/null +++ b/doc/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 `ci.gitlab.com` for testing your application with such configuration. |