I run tests inside docker container on a shell runner (NodeJS/jest);
How can I fail gitlab pipeline if tests fail from inside the container?
- I've tried
process.exit(1)
in case there are failing tests but it didn't help. - I considered running tests as part of Dockerfile
RUN
but I need theenvironment
variables to configure URLs to other containers.
Since all tests are http calls to other containers I also expect that after_script
will work for tearing down the environment regardless of the outcome.