Skip to content

Refresh Codecov baseline on a schedule, not on push - #13

Merged
imanimanyara merged 2 commits into
mainfrom
ci/codecov-baseline
Oct 2, 2026
Merged

imanimanyara merged 2 commits into
mainfrom
ci/codecov-baseline

Conversation

@imanimanyara

Copy link
Copy Markdown
Member

What

  • CI triggers: ci.yml runs on pull_request + workflow_dispatch only. The push: branches: [main] trigger is removed.
  • Baseline: a new coverage-baseline.yml runs weekly (Mon 06:00 America/New_York = 0 11 * * 1 UTC, matching dependabot) and on workflow_dispatch. It runs the tests on Ubuntu/3.12 and uploads to Codecov, so main keeps a fresh comparison base.
  • Upload fix: the PR upload step never ran, because its if: read matrix.python-version and the matrix key is python. That is now fixed. codecov/codecov-action is pinned to 303a32d7… (# v7.1.1), uses CODECOV_TOKEN when configured (tokenless otherwise), and keeps fail_ci_if_error: false.
  • codecov.yml: carryforward flags, a blocking project status with a 1% threshold, and an advisory patch status.
  • Local floor: [tool.coverage.report] fail_under = 84 replaces --cov-fail-under=80. CI measured 84.81% on Ubuntu and 84.87% on macOS, rounded down to 84. I checked that the floor passes at 84 and fails at 90.
  • Docs: CONTRIBUTING coverage section, CHANGELOG, README Codecov badge.

Note

No CODECOV_TOKEN exists at repo level, and the org level could not be checked. If tokenless uploads are refused, add the secret. The PR stays green either way.

CI triggered on push to main only so Codecov had a main baseline, which
re-ran the full matrix after every merge. A weekly coverage-baseline
workflow (Monday 06:00 America/New_York, plus workflow_dispatch) now
refreshes the baseline, and ci.yml runs on pull_request and
workflow_dispatch only.

The upload step never ran: its condition read matrix.python-version
but the matrix key is python. Fix the key, pin codecov-action to the
v7.1.1 SHA, and pass CODECOV_TOKEN when one exists. The upload stays
fail_ci_if_error: false so a Codecov outage never blocks a PR.

codecov.yml enables carryforward flags so a stale or missing main
upload does not zero the comparison.

Move the coverage floor from --cov-fail-under=80 to
[tool.coverage.report] fail_under = 84, so local runs enforce the same
number. 84 is the CI total (84.81% ubuntu, 84.87% macos) rounded down.
Record the trigger change, the raised floor and the upload fix in the
changelog, explain how coverage is enforced in CONTRIBUTING, and add the
Codecov badge to the README.
Copilot AI balanced review requested due to automatic review settings October 2, 2026 15:38

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@imanimanyara
imanimanyara merged commit 0b8522a into main Oct 2, 2026
15 checks passed
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.

2 participants