ci(coverage): add Codecov integration with 60% project gate#1245
ci(coverage): add Codecov integration with 60% project gate#1245kovtcharov-amd wants to merge 2 commits into
Conversation
|
Minimal and correct CI addition — the implementation is clean, well-scoped, and the SummaryThe PR wires the existing pytest-cov output to Codecov with sensible project (60%) and patch (70%) gates. The Issues Found🟢 Minor —
|
|
Solid, well-scoped CI addition — coverage was already being computed but silently discarded; this PR wires the upload and adds a 60%/70% gate with no unnecessary scope creep. SummaryThree files, one logical change: generate Issues Found🟢 No The project gate has a 2% forgiveness window ( 🟢 Codecov action not pinned to a commit SHA (
Strengths
VerdictApprove — one optional nit on the patch threshold, no blockers. The secret configuration note in the PR description is the only remaining action before the gate is live. |
itomek
left a comment
There was a problem hiding this comment.
Coverage was being computed and discarded; this wires the upload with codecov-action@v5 + if: always(), both correct (the earlier v4/if-always review notes are stale). One patch-gate behavior point noted inline. Separately, per the description the upload silently no-ops without CODECOV_TOKEN — the right bootstrap choice, but it means the 60% gate isn't actually live until the secret is configured, so confirm that's set so this doesn't sit as a no-op. Approving.
Generated by Claude Code
There was a problem hiding this comment.
Project gets threshold: 2% but patch has no threshold, so a PR whose changed lines land at 69.9% fails the patch status outright. If this status is meant to block merges, add threshold: 2% here for parity with project; if advisory-only at first, fine as-is — just be explicit about which, since require_ci_to_pass: true plus a hard patch target reads as blocking.
Generated by Claude Code
Unit tests already ran pytest-cov but never uploaded the data. Now coverage.xml is generated and uploaded to Codecov on the py3.12 matrix leg, with a 60% project target and 70% patch target. pytest-cov is declared as a dev dependency so local runs pick it up too. Closes #879
Add `if: always()` so partial-run coverage is still uploaded when tests fail. Upgrade to codecov-action@v5 and move token from env to the `with` block per the v5 migration guide.
33c681d to
01d0345
Compare
Unit tests already ran pytest-cov but the data was never uploaded — no visibility into coverage trends, no PR gates. Now every unit-test run generates
coverage.xmland uploads it to Codecov (py3.12 leg only to avoid duplicate reports), with a 60% project target and 70% patch target so regressions surface before merge.Note:
CODECOV_TOKENmust be added to the repo's Actions secrets (Settings → Secrets → Actions) for the upload step to authenticate. Without it the upload silently no-ops (fail_ci_if_error: false).Test plan
CODECOV_TOKENsecret is configured in repo settingssrc/gaia/and verify Codecov posts a coverage status checkCloses #879