Hello,
In my job I am running the flake8
linter in a docker container as a background step while my other tests are running:
# Run linting tests
- run:
name: Run flake8
background: true
command: eval ${docker_compose} run flake8
# Run pytest tests using docker-compose
- run:
name: Tests
command: eval ${docker_compose} run pytest
However, I have noticed that if the linting fails (and correctly exits with a non-zero exit code) but the other tests are green, then the whole job will end up green, despite the fact that one of the steps is red.
I spent a long time looking in the documentation to whether this was expected but could not find anything. Then, I found this forum post:
This is pretty annoying. Is there any trick I can do to ensure that the whole job fails?