Skip to content

Commit 92cfa57

Browse files
nficanoclaude
andcommitted
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) <noreply@anthropic.com>
1 parent 0584ed1 commit 92cfa57

1 file changed

Lines changed: 14 additions & 1 deletion

File tree

.github/workflows/test.yml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,20 @@ jobs:
7474
run: uv run pyright
7575

7676
- name: Pytest
77-
run: uv run pytest --junitxml=junit-${{ matrix.python-version }}.xml
77+
run: uv run pytest --junitxml=junit-${{ matrix.python-version }}.xml --cov-report=xml
78+
79+
# Upload coverage from the floor matrix entry only — the report is the
80+
# same on every Python version, so one upload is enough. Non-blocking:
81+
# a Codecov outage must not break CI.
82+
- name: Upload coverage to Codecov
83+
if: matrix.python-version == '3.13'
84+
# codecov/codecov-action v6.0.1
85+
uses: codecov/codecov-action@e79a6962e0d4c0c17b229090214935d2e33f8354 # v6.0.1
86+
with:
87+
fail_ci_if_error: false
88+
flags: unittests
89+
files: ./coverage.xml
90+
token: ${{ secrets.CODECOV_TOKEN }}
7891

7992
- name: Upload junit XML on failure
8093
if: failure()

0 commit comments

Comments
 (0)