Skip to content
Snippets Groups Projects
Commit 23f4e1ca authored by Kamil Trzciński's avatar Kamil Trzciński
Browse files

Merge branch 'clojure-example' into 'master'


Add example for testing clojure application

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>

See merge request !238
parents 1fdd1fa6 53df2e73
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -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
Loading
Loading
@@ -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)
Loading
Loading
@@ -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)
## 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.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment