Note:
This document has not been updated recently and could be out of date. For the latest documentation, see the GitLab CI/CD page and the GitLab CI/CD Pipeline Configuration Reference.
Test a Clojure application with GitLab CI/CD
This example will guide you how to run tests on your Clojure application.
You can view or fork the example source and view the logs of its past CI jobs.
Configure the project
This is what the .gitlab-ci.yml
file looks like for this project:
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.
The sample project uses the migratus library to manage database migrations, and
we have added a database migration as the last step of before_script
.
You can use public runners available on gitlab.com
for testing your application with this configuration.
Help and feedback
If there's something you don't like about this feature
To propose functionality that GitLab does not yet offer
To further help GitLab in shaping new features
If you didn't find what you were looking for
If you want help with something very specific to your use case, and can use some community support
POST ON GITLAB FORUM
If you have problems setting up or using this feature (depending on your GitLab subscription)
REQUEST SUPPORT
To view all GitLab tiers and features or to upgrade
If you want to try all features available in GitLab.com
If you want to try all features available in GitLab self-managed
If you spot an error or a need for improvement and would like to fix it yourself in a merge request
EDIT THIS PAGE
If you would like to suggest an improvement to this doc