Only upload test results to Codecov when pytest actually ran - #25
Conversation
The test-results upload is guarded by `if: ${{ !cancelled() }}`, which is
deliberate: when the suite runs and fails, that is precisely when Codecov's
test analytics is worth having, so it must not be skipped on failure.
But that condition cannot tell "tests ran and failed" from "tests never ran".
When an earlier step fails -- pyright did, on PR #23 -- GitHub skips the pytest
step, so no junit.xml is produced, while the upload step still executes and
reports "The CLI was unable to find any JUnit XML files to upload." That reads
like a broken Codecov configuration and draws attention away from the actual
failure, which was three steps earlier.
Giving pytest an id and adding `steps.pytest.conclusion != 'skipped'` keeps the
valuable case and drops the noisy one. The coverage upload needed no change: it
carries no `if`, so it already inherits the default success() condition and was
correctly skipped in that run.
Note this cannot be demonstrated by a green CI run, which exercises only the
unchanged path. It was verified against run 30808584716, where the step list
shows pytest skipped and the upload succeeding with nothing to upload.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
Warning Review limit reached
Next review available in: 48 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
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 |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
The test-results upload is guarded by
if: ${{ !cancelled() }}, which isdeliberate: when the suite runs and fails, that is precisely when Codecov's
test analytics is worth having, so it must not be skipped on failure.
But that condition cannot tell "tests ran and failed" from "tests never ran".
When an earlier step fails -- pyright did, on PR #23 -- GitHub skips the pytest
step, so no junit.xml is produced, while the upload step still executes and
reports "The CLI was unable to find any JUnit XML files to upload." That reads
like a broken Codecov configuration and draws attention away from the actual
failure, which was three steps earlier.
Giving pytest an id and adding
steps.pytest.conclusion != 'skipped'keeps thevaluable case and drops the noisy one. The coverage upload needed no change: it
carries no
if, so it already inherits the default success() condition and wascorrectly skipped in that run.
Note this cannot be demonstrated by a green CI run, which exercises only the
unchanged path. It was verified against run 30808584716, where the step list
shows pytest skipped and the upload succeeding with nothing to upload.
🤖 Generated with Claude Code