Skip to content

Measure coverage at the PR head that Codecov receives - #264

Merged
LucaCappelletti94 merged 1 commit into
mainfrom
coverage-checkout-pr-head
Nov 6, 2026
Merged

LucaCappelletti94 merged 1 commit into
mainfrom
coverage-checkout-pr-head

Conversation

@LucaCappelletti94

Copy link
Copy Markdown
Collaborator

On pull requests actions/checkout checks out the merge of the PR into main, while codecov-action uploads that coverage under the PR head SHA. Once main has moved past the PR's base, Codecov reads the merged tree's coverage at the head's line numbers and flags the wrong lines as missed.

Every job that uploads to Codecov now checks out the PR head it uploads. Pushes and every other event keep github.sha.

@LucaCappelletti94
LucaCappelletti94 merged commit 8da0974 into main Nov 6, 2026
10 of 18 checks passed
@LucaCappelletti94
LucaCappelletti94 deleted the coverage-checkout-pr-head branch November 6, 2026 13:41
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