Posts tagged: rake-test
-
Run Rails tests on Gitlab CI with a Postgres database
Gitlab CI can be used to run rails tests on every push. It’s pretty straight forward to setup.
First create a .gitlab-ci.yml
file:
The before_script
installs everything we need to run the tests.
test
job creates the database and executes the tests.
Next, create a gitlab specific database config config/database-gitlab.yml
to connect
to the database setup earlier.
Now the tests will be run on each push!