Repository navigation
ci: make coverage reporting actually work without a secret - #1
Merged
Merged
Conversation
The Codecov step was reporting success while silently failing. Its log:
-> Token length: 0
info -- Found 1 coverage files to report
error -- Upload queued for processing failed:
{"message":"Token required - not valid tokenless upload"}
##[end-action outcome=success;conclusion=success]
fail_ci_if_error: false was chosen so a missing secret could not redden the
matrix, but it turned a real failure into an invisible one — no coverage was
ever published despite a green check.
Coverage now needs no secret and no third-party service:
- the total lands in the job summary and the step log
- coverage.out is uploaded as an artifact
Codecov is kept for trend data but gated on the token actually being present,
so it visibly skips rather than invisibly failing. The secret is mapped to
job-level env because the secrets context is not available in a step-level if.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014Ug1TBaLJkUd3dP9SNAaoD
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.
Problem
The Codecov step was reporting success while silently failing. From the run log on
main:fail_ci_if_error: falsewas chosen so a missing secret couldn't redden the matrix — but it turned a real failure into an invisible one. No coverage has ever been published, despite a green check on every run.That's the same silent-misconfiguration class this project exists to catch, so it shouldn't be shipping in our own CI.
Change
Coverage reporting now needs no secret and no third-party service:
coverage.outis uploaded as a build artifactCodecov is kept for trend data, but gated on the token actually being present, so it visibly skips rather than invisibly failing. The secret is mapped to job-level
envbecause thesecretscontext isn't available in a step-levelif.Verification
actionlintcleango test -covermode=atomicproduces a valid profile andgo tool cover -funcreportstotal: 0.0%rather than erroringpull_requesttrigger — DCL-02's AC-1 requires all six legs green "on push and PR", and only the push half had evidence until now🤖 Generated with Claude Code
https://claude.ai/code/session_014Ug1TBaLJkUd3dP9SNAaoD