Repository navigation
ci: upload Windows coverage and fix the Codecov patch target - #661
Merged
Merged
Conversation
Only the ubuntu leg uploaded coverage, so the Windows-only code (about 2,300 lines of *_windows.go and every runtime.GOOS == "windows" branch in shared code) read as uncovered on every pull request that touched it, though the Windows leg runs those tests. The Windows test leg now runs with coverage and uploads it under a Windows flag; Codecov counts a line covered when either report covers it. macOS stays without coverage: its platform-only code is about 140 lines. The patch target was Codecov's default, the project's own coverage (94.4% at the time), so a few untested error paths in a small diff failed it. It is now a fixed 90%, just under dev/coverage-floor. The project status is off; dev/coverfloor is the project gate. wait_for_ci is stated explicitly so the status posts once, after both uploads. sandbox/egress_linux.go and sandbox/forward_linux.go come out of the ignore list. They were ignored because the runner skipped their tests (10% and 50%), but the test job now lifts the user-namespace restriction and requires confinement; main's latest profile has them at 84.4% and 72.2%. Signed-off-by: Ion Alpha <[email protected]>
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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
The Windows test leg now runs with coverage and uploads it to Codecov beside the Linux report.
codecov.ymlsets a fixed 90% patch target in place of Codecov's default, turns the project status off, and drops two stale ignore entries.Why
Only Linux uploaded, so the Windows-only code (about 2,300 lines of
*_windows.go, plus everyruntime.GOOS == "windows"branch in shared code) read as uncovered on every pull request that touched it, although the Windows leg runs those tests. #658 was red on codecov/patch largely for that reason.The patch target defaulted to the project's own coverage, 94.4%, so three or four untested error paths in a small diff failed it. 90% sits just under
dev/coverage-floor(91.1%). The project status is off becausedev/coverflooralready gates project coverage in CI.sandbox/egress_linux.goandsandbox/forward_linux.gowere ignored because the runner skipped their tests and reported 10% and 50%. The test job now lifts the user-namespace restriction and setsFLYNN_TEST_REQUIRE_CONFINEMENT, and main's latest coverage profile (run 41419408636) has them at 84.4% and 72.2%, so the ignore was hiding real numbers.How to verify
On this PR's run: the Windows test job has an "Upload coverage" step that succeeds, and the Codecov report lists a
Windowsflag besideLinux.curl --data-binary @codecov.yml https://codecov.io/validatereturnsValid!.Notes for reviewers
The cost is atomic coverage instrumentation on the Windows leg, which was the slowest test job at 16.0 minutes on main's last run (Linux 12.3, macOS 7.6). This PR's run gives the new figure. If the increase is too much, the alternative is a separate Windows coverage job that runs only the packages with Windows-specific code, so the race leg keeps its current time.
macOS stays without coverage: about 140 lines are macOS-only.
dev/coverflooris unchanged and still reads the Linux profile alone.