chore: wait for both coverage uploads before posting a Codecov status - #99
Merged
Conversation
go.yml uploads coverage twice per commit under separate flags (unit, integration). Without after_n_builds, Codecov posts a status as soon as either upload lands - the unit job usually finishes first and barely touches DB-dependent code, so PRs touching internal/db or internal/importer briefly showed a failing patch-coverage check that flipped to passing a couple minutes later once the integration job's upload arrived (observed on #98).
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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.
Summary
Observed on #98: PRs briefly show a failing `codecov/patch` check that flips to passing a couple minutes later. Root cause: `go.yml` uploads coverage twice per commit under separate flags (`unit`, `integration`), and without `after_n_builds` configured, Codecov posts a status as soon as either upload lands. The `unit` job finishes first and barely touches DB-dependent code (most of `internal/db`/`internal/importer`/`internal/process` is only exercised by `-tags integration` tests), so its partial view of the diff often reads as a coverage drop until the `integration` job's upload arrives and the combined report is complete.
Adds a minimal `codecov.yml` with `notify.after_n_builds: 2` so Codecov waits for both uploads before posting a final status — no more transient false-fail.
Test plan