Discuss altering test job to use docker-compose commands/interface
The current test
job generated by Auto-DevOps.gitlab-ci.yml
+ tox-tests.yml
will run tox
via a hard-coded docker
command on the project's prod docker image. However locally developers are running tox via docker-compose (using the prod docker image). This results in:
- supporting service versions don't match - local compose postgress version might be 12, CI is now 15.
- additional services can't be added to tests (e.g. an opensearch container, cypress, reddis etc.)
- the test command can be (and is) different between local and the CI
- adding tox default environments is not reflected in the CI run
- the output text is different between local and CI runs and this makes debugging harder
Discuss changing the test job to call tox via the docker compose setup in the projects or other strategy. Then create tickets to accomplish this work.
Implementation Notes:
- We don't want to build the docker images again after the auto-devops build job and we also don't want the docker-compose setup to have to point to specific images. We should be able to make this work by adding caching directives to the docker-compose setup. We can then have docker-compose do a normal build but it should in theory pull from the registry cache/layers instead. Or we can use some combination of ENVs/inputs in the compose files.
- As the boilerplate doesn't currently pin the CI templates we potentially need to make it work for projects that don't have the full compose interface.