Tests fail but job finishes successfully

This can commonly happen when you're running your tests within a multi-line run step.

Example:

      - run:
          name: run tests
          command: |
            source venv/bin/activate
            python manage.py test

To work around this add set -e at the top of the multiline command. This will ensure that errors are not suppressed and are instead passed up to fail the build.

      - run:
          name: run tests
          command: |
set -e source venv/bin/activate python manage.py test
Was this article helpful?
0 out of 1 found this helpful

Comments

0 comments

Please sign in to leave a comment.