Repository navigation
Refresh Codecov baseline on a schedule, not on push - #13
Merged
Merged
Conversation
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.
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.
What
ci.ymlruns onpull_request+workflow_dispatchonly. Thepush: branches: [main]trigger is removed.coverage-baseline.ymlruns weekly (Mon 06:00 America/New_York =0 11 * * 1UTC, matching dependabot) and onworkflow_dispatch. It runs the tests on Ubuntu/3.12 and uploads to Codecov, somainkeeps a fresh comparison base.if:readmatrix.python-versionand the matrix key ispython. That is now fixed.codecov/codecov-actionis pinned to303a32d7…(# v7.1.1), usesCODECOV_TOKENwhen configured (tokenless otherwise), and keepsfail_ci_if_error: false.[tool.coverage.report] fail_under = 84replaces--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.Note
No
CODECOV_TOKENexists 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.