This repository has been archived by the owner. It is now read-only.
Fetching contributors…
Cannot retrieve contributors at this time
36 lines (26 sloc) 1.11 KB

Test Clojure applications

This example will guide you how to run tests in your Clojure application.

You can checkout the example source and check CI status.

Configure project

This is what the .gitlab-ci.yml file looks like for this project:

  POSTGRES_DB: sample-test
  DATABASE_URL: "postgresql://postgres@postgres:5432/sample-test"

  - apt-get update -y
  - apt-get install default-jre postgresql-client -y
  - wget
  - chmod a+x lein
  - export LEIN_ROOT=1
  - PATH=$PATH:.
  - lein deps
  - lein migratus migrate

    - lein test

In before script we install JRE and Leiningen. Sample project uses 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 for testing your application with such configuration.