From c5b2fcec54fffb94b7d20c18b2147083b401e364 Mon Sep 17 00:00:00 2001 From: Sean Whalen <44679+seanthegeek@users.noreply.github.com> Date: Tue, 19 May 2026 21:12:20 -0400 Subject: [PATCH] Enhance CI with JUnit XML output and Codecov results Added JUnit XML output for pytest and Codecov test results upload. --- .github/workflows/python-tests.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/python-tests.yml b/.github/workflows/python-tests.yml index 54ae5db..ab90a23 100644 --- a/.github/workflows/python-tests.yml +++ b/.github/workflows/python-tests.yml @@ -73,7 +73,7 @@ jobs: pip install .[build] - name: Run unit tests run: | - pytest --cov --cov-report=xml tests.py + pytest --cov --cov-report=xml -junitxml=junit.xml -o junit_family=legacy tests.py - name: Test sample DMARC reports run: | pip install -e . @@ -83,3 +83,13 @@ jobs: uses: codecov/codecov-action@v5 with: token: ${{ secrets.CODECOV_TOKEN }} + fail_ci_if_error: false + - name: Upload test results to Codecov + # Feeds Codecov Test Analytics (flaky-test detection, per-test + # history). Runs even on test failure so failed cases still get + # reported. Uses the same CODECOV_TOKEN as the coverage upload. + if: ${{ !cancelled() }} + uses: codecov/test-results-action@v1 + with: + token: ${{ secrets.CODECOV_TOKEN }} + files: ./junit.xml