From 83ddeb7d7dcdae9ab80c06604198e21babaea6a5 Mon Sep 17 00:00:00 2001 From: Tim Grelka Date: Sat, 5 Jul 2025 01:16:12 +0200 Subject: [PATCH] ci: fail pytest job on test failure --- .github/workflows/pytest.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml index c583175..c7cef8f 100644 --- a/.github/workflows/pytest.yml +++ b/.github/workflows/pytest.yml @@ -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