fix(ci): set COVERAGE_FILE so unit coverage uploads correctly#1223
Merged
LalatenduMohanty merged 1 commit intoJun 29, 2026
Merged
Conversation
📝 WalkthroughWalkthroughThe CI workflow sets Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
The switch from `coverage run -m pytest` to `pytest --cov` (python-wheel-build#1219) caused pytest-cov to write a single `.coverage` file. The CI upload step uses the glob `.coverage.*`, which requires a suffix after the dot — so the unit test coverage data was never uploaded. Only e2e coverage data (which still produces `.coverage.*` files via subprocess instrumentation) reached the combine step, dropping overall coverage from ~93% to 37% and failing the `--fail-under=60` gate. Fix by setting `COVERAGE_FILE` with a per-job suffix so pytest-cov writes directly to e.g. `.coverage.unit.py3.12.ubuntu-latest`, which the upload glob matches. Also remove `tests/` from `[tool.coverage.run].source` to measure only production code coverage. Closes: python-wheel-build#1222 Co-Authored-By: Claude <claude@anthropic.com> Signed-off-by: Lalatendu Mohanty <lmohanty@redhat.com>
55310ac to
03af7a5
Compare
dhellmann
reviewed
Jun 29, 2026
dhellmann
approved these changes
Jun 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The switch from
coverage run -m pytesttopytest --cov(#1219)caused pytest-cov to write a single
.coveragefile. The CI uploadstep uses the glob
.coverage.*, which requires a suffix after thedot — so the unit test coverage data was never uploaded. Only e2e
coverage data (which still produces
.coverage.*files via subprocessinstrumentation) reached the combine step, dropping overall coverage
from ~93% to 37% and failing the
--fail-under=60gate.Fix by setting
COVERAGE_FILEwith a per-job suffix so pytest-covwrites directly to e.g.
.coverage.unit.py3.12.ubuntu-latest, whichthe upload glob matches.
Also remove
tests/from[tool.coverage.run].sourceto measureonly production code coverage.
Closes: #1222