Skip to content

Commit 4c57951

Browse files
chore: emit and upload coverage.xml from CI (#576)
The test job ran `make test` (no coverage) even though a `test-coverage` target and pytest-cov were already in place. Point CI at that target and upload the report so the weekly coverage report can read the number from the newest successful run on main instead of it being collected by hand. Coverage measures 94.3% (3305/3505 lines), which matches the figure the weekly report has been carrying — this repo's hand-collected number was already accurate, so publishing the artifact just removes the manual step. `if-no-files-found: error` so a silently-missing report fails the step rather than publishing an empty artifact. Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent 07fc6e2 commit 4c57951

2 files changed

Lines changed: 13 additions & 2 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,21 @@ jobs:
4040
UV_PYTHON: ${{ matrix.python-version }}
4141

4242
- name: Run tests
43-
run: make test
43+
run: make test-coverage
4444
env:
4545
UV_PYTHON: ${{ matrix.python-version }}
4646

47+
# Consumed by the weekly coverage report, which reads the artifact from
48+
# the newest successful run on main. Name is per-matrix-version because
49+
# upload-artifact@v4 requires unique names within a run.
50+
- name: Upload coverage report
51+
uses: actions/upload-artifact@v4
52+
if: always()
53+
with:
54+
name: coverage-${{ matrix.python-version }}
55+
path: coverage.xml
56+
if-no-files-found: error
57+
4758
e2e:
4859
if: github.event_name != 'schedule' && github.repository == 'runpod/runpod-python'
4960
runs-on: ubuntu-latest

‎Makefile‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ test:
99
uv run pytest
1010

1111
test-coverage:
12-
uv run pytest --cov=runpod --cov-report=term-missing
12+
uv run pytest --cov=runpod --cov-report=term-missing --cov-report=xml
1313

1414
# --- Build ---
1515
build:

0 commit comments

Comments
 (0)