ci: fail pytest job on test failure

This commit is contained in:
Tim Grelka
2025-07-05 01:16:12 +02:00
parent 3f626a814c
commit 83ddeb7d7d
+4 -1
View File
@@ -21,9 +21,12 @@ jobs:
- name: Install failure annotation plugin
run: pip install pytest-github-actions-annotate-failures
- name: Test with pytest
run: pytest --junitxml=pytest.xml --cov-report=term-missing:skip-covered --cov-report=html --cov | tee pytest-coverage.txt
run: |
set -o pipefail
pytest --junitxml=pytest.xml --cov-report=term-missing:skip-covered --cov-report=html --cov | tee pytest-coverage.txt
- name: Comment pytest code coverage
uses: MishaKav/pytest-coverage-comment@main
if: ${{ always() }}
with:
pytest-coverage-path: ./pytest-coverage.txt
junitxml-path: ./pytest.xml