From 92cfa572afe65938beacb62d150882d95358fa61 Mon Sep 17 00:00:00 2001 From: Nick Ficano Date: Sun, 24 May 2026 21:11:08 -0400 Subject: [PATCH] ci: upload coverage to Codecov Emit coverage.xml from pytest (--cov is already configured in pyproject.toml) and upload it on the Python floor matrix entry only. Non-blocking so a Codecov outage cannot break CI. Requires CODECOV_TOKEN to be set as a repo secret. Co-Authored-By: Claude Opus 4.7 (1M context) --- .github/workflows/test.yml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a999b09..cf7e9f5 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -74,7 +74,20 @@ jobs: run: uv run pyright - name: Pytest - run: uv run pytest --junitxml=junit-${{ matrix.python-version }}.xml + run: uv run pytest --junitxml=junit-${{ matrix.python-version }}.xml --cov-report=xml + + # Upload coverage from the floor matrix entry only — the report is the + # same on every Python version, so one upload is enough. Non-blocking: + # a Codecov outage must not break CI. + - name: Upload coverage to Codecov + if: matrix.python-version == '3.13' + # codecov/codecov-action v6.0.1 + uses: codecov/codecov-action@e79a6962e0d4c0c17b229090214935d2e33f8354 # v6.0.1 + with: + fail_ci_if_error: false + flags: unittests + files: ./coverage.xml + token: ${{ secrets.CODECOV_TOKEN }} - name: Upload junit XML on failure if: failure()