Skip to content

Commit 78c0dec

Browse files
nficanoclaude
andauthored
ci: upload coverage to Codecov (#35)
`dotnet test --collect:"XPlat Code Coverage"` (coverlet.collector) is already producing one coverage.cobertura.xml per test project under TestResults/. Upload the directory to Codecov non-blockingly 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 e8dc1bd commit 78c0dec

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

.github/workflows/test.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,18 @@ jobs:
8888
run: |
8989
python3 scripts/check-coverage.py --threshold 80 --results-dir "${{ github.workspace }}/TestResults"
9090
91+
# `--collect:"XPlat Code Coverage"` (coverlet.collector) writes one
92+
# coverage.cobertura.xml per test project under TestResults/<guid>/.
93+
# Non-blocking: a Codecov outage must not break CI.
94+
- name: Upload coverage to Codecov
95+
# codecov/codecov-action v6.0.1
96+
uses: codecov/codecov-action@e79a6962e0d4c0c17b229090214935d2e33f8354 # v6.0.1
97+
with:
98+
fail_ci_if_error: false
99+
flags: unittests
100+
directory: ${{ github.workspace }}/TestResults
101+
token: ${{ secrets.CODECOV_TOKEN }}
102+
91103
- name: Upload test results
92104
if: failure()
93105
uses: actions/upload-artifact@v7

0 commit comments

Comments
 (0)