diff --git a/.github/workflows/_tests.yml b/.github/workflows/_tests.yml index e759f3a..438743f 100644 --- a/.github/workflows/_tests.yml +++ b/.github/workflows/_tests.yml @@ -166,6 +166,8 @@ jobs: - name: Install packages run: uv pip install --system -e '.[test]' - name: Run tests + id: pytest + continue-on-error: true run: pytest --cov . - name: Upload coverage artifact uses: actions/upload-artifact@v4 @@ -175,6 +177,14 @@ jobs: name: ${{ env.ARTIFACT_NAME }} path: .coverage retention-days: 1 + - name: Validate run + run: | + if [ "${STEPS_PYTEST_OUTCOME}" != "success" ]; then + echo "Tests failed!" + exit 1 + fi + env: + STEPS_PYTEST_OUTCOME: ${{ steps.pytest.outcome }} coverage: runs-on: ubuntu-latest @@ -204,7 +214,6 @@ jobs: coverage combine $(find downloaded_artifacts/ -type f | xargs) # Used by codecov coverage xml - coverage report --format=markdown >> $GITHUB_STEP_SUMMARY - name: Upload single coverage artifact uses: actions/upload-artifact@v4 with: @@ -215,7 +224,6 @@ jobs: retention-days: 1 - name: Diff coverage run: | - coverage xml diff-cover coverage.xml --compare-branch origin/master --format github-annotations:warning - name: Upload coverage to Codecov uses: codecov/codecov-action@v4 @@ -224,3 +232,5 @@ jobs: fail_ci_if_error: true token: ${{ secrets.CODECOV_TOKEN }} env_vars: OS,RUST + - name: Check + run: coverage report --format=markdown --fail-under=90 >> $GITHUB_STEP_SUMMARY diff --git a/pyproject.toml b/pyproject.toml index fd017c2..9578d69 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -152,7 +152,6 @@ omit = ["*/migrations_*/*"] [tool.coverage.report] show_missing = true -fail_under = 90 [tool.coverage.html] show_contexts = true