ci(codecov): wait for all coverage uploads before reporting status#497
Open
sandersaares wants to merge 3 commits into
Open
ci(codecov): wait for all coverage uploads before reporting status#497sandersaares wants to merge 3 commits into
sandersaares wants to merge 3 commits into
Conversation
The coverage job runs a 3-OS matrix, each uploading independently. Codecov posted the codecov/project status after the first upload, before data from the other platforms arrived, causing spurious coverage failures. Set codecov.notify.after_n_builds to 3 (the number of OS entries in the coverage matrix) so Codecov waits for all uploads before reporting, and add cross-referencing comments in codecov.yml and main.yml to keep the count in sync. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Adjusts Codecov configuration so the codecov/project status isn’t reported until all OS legs of the coverage matrix have uploaded coverage, preventing premature/spurious failures on PRs.
Changes:
- Add
codecov.notify.after_n_builds: 3to delay status reporting until all three matrix uploads arrive. - Add cross-referencing comments in
codecov.ymland thecoveragejob matrix to keep the build count and OS list in sync.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
codecov.yml |
Adds Codecov notify settings to wait for all expected coverage uploads before posting status. |
.github/workflows/main.yml |
Documents the coupling between the coverage OS matrix size and codecov.notify.after_n_builds. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
martin-kolinek
approved these changes
Jun 12, 2026
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #497 +/- ##
=====================================
Coverage 99.9% 99.9%
=====================================
Files 336 336
Lines 24829 24829
=====================================
Hits 24818 24818
Misses 11 11 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Vaiz
approved these changes
Jun 12, 2026
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.
The
coveragejob inmain.ymlruns a 3-OS matrix (ubuntu-latest, windows-latest, ubuntu-24.04-arm), each uploading coverage to Codecov independently. Codecov posted thecodecov/projectstatus as soon as the first upload arrived, before data from the other platforms had been received, which flagged us with a spurious "coverage check failed".This sets
codecov.notify.after_n_builds: 3so Codecov holds the status until all coverage matrix jobs have uploaded and it has the full multi-platform dataset. Each matrix OS does a single upload (its comma-separated lcov files are merged into one report), so the value equals the number of OS entries in the matrix.I added cross-referencing comments in both
codecov.ymland the matrix inmain.ymlso maintainers keep the count in sync when adding/removing an OS.Note: with
after_n_builds: 3, if one coverage leg fails it uploads fewer than 3 reports and the status stays pending, blocking merge. This is acceptable sincecoverageis already a required check, so a failing leg must be fixed/re-run regardless.The config was validated against https://codecov.io/validate (Valid!).