ci: authenticate Codecov uploads with CODECOV_TOKEN#15
Merged
Conversation
Pass the CODECOV_TOKEN secret (and slug) to codecov-action so main-branch uploads are authenticated rather than relying on tokenless upload, which Codecov rate-limits. The repo just needs a CODECOV_TOKEN secret added (Codecov project settings → repository upload token); fail_ci_if_error stays false so a Codecov hiccup never fails the test job. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017CTL1QSTg1DmDUpqYuPEog
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.
Links up the Codecov badge by making coverage uploads authenticated.
The pieces were already in place — a
codecov.yml(100% project/patch targets), a--cov-report=xmlstep, and acodecov/codecov-action@v7upload. The missing bit is the token: Codecov rate-limits tokenless uploads on direct pushes tomain, which is why the badge can read "unknown". This passestoken: ${{ secrets.CODECOV_TOKEN }}(andslug:) to the action.One-time setup (your side)
moderndive/moderndive-python.CODECOV_TOKEN(gh secret set CODECOV_TOKEN).After that, the next push to
mainuploads coverage and the existing README badge turns green.fail_ci_if_errorstaysfalse, so a Codecov outage never fails the test job.The badge URL in the README is already correct for a public repo — no change needed there.
🤖 Generated with Claude Code