Skip to content

ci: authenticate Codecov uploads with CODECOV_TOKEN#15

Merged
ismayc merged 1 commit into
mainfrom
ci/codecov-token
Jun 20, 2026
Merged

ci: authenticate Codecov uploads with CODECOV_TOKEN#15
ismayc merged 1 commit into
mainfrom
ci/codecov-token

Conversation

@ismayc

@ismayc ismayc commented Jun 20, 2026

Copy link
Copy Markdown
Member

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=xml step, and a codecov/codecov-action@v7 upload. The missing bit is the token: Codecov rate-limits tokenless uploads on direct pushes to main, which is why the badge can read "unknown". This passes token: ${{ secrets.CODECOV_TOKEN }} (and slug:) to the action.

One-time setup (your side)

  1. Log in to https://app.codecov.io with GitHub and activate moderndive/moderndive-python.
  2. Copy the repository upload token (Codecov → repo → Settings).
  3. Add it as a GitHub Actions secret named CODECOV_TOKEN (gh secret set CODECOV_TOKEN).

After that, the next push to main uploads coverage and the existing README badge turns green. fail_ci_if_error stays false, 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

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
@ismayc ismayc merged commit 8608cfd into main Jun 20, 2026
6 checks passed
@ismayc ismayc deleted the ci/codecov-token branch June 20, 2026 16:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant