Skip to content

Fix ci

Sam Galson requested to merge fix-ci into master

This MR closes #59 (closed) and #60 (closed)

  • updates the docker-compose file so that ink and all depended on services can be started with a single command
  • fixes a failing test
  • adds gitlab-ci config for ci (closes #59 (closed))
  • adds option to log to stdout

Commands

  • development: docker-compose up
  • test (mounts project as volume): ./scripts/test. This command will pass its arguments through to rspec.
  • gitlab-ci locally: gitlab-runner exec docker --docker-volumes /var/run/docker.sock:/var/run/docker.sock --env CI_COMMIT_SHA=<a-tag-of-an-image-on-the-local-machine> test.
  • production: do not use docker-compose (kubernetes templates will be added)

Further notes:

  • Seeds for development are run from ./bin/rake setup (cf. #62).
  • Scripts have been tidied up a bit. Those to be run inside containers are in bin (plus some others whose purpose is unclear). Those to be run on the host are in script.
  • test and development rails envs no longer force POSTGRESQL_HOST=localhost (bc docker requires postgres), but localhost will be the default.

Test

The failing test was testing that loading a file had failed to load a class not defined in that file. Unfortunately the class had sometimes been loaded elsewhere, depending on test execution order.

Logging

Set RAILS_LOG_TO_STDOUT=1 to log to stdout instead of file.

Edited by Sam Galson

Merge request reports