ci: report coverage in the job summary and to Codecov - #35
Merged
Merged
Conversation
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.
Coverage was already being collected —
--collect:"XPlat Code Coverage"withcoverlet.collectorreferenced — but the Cobertura file went into a 124 KB artifact zip and nowhere else. Collected but invisible.Two reporting surfaces, because they answer different questions.
1. Job summary — visible on every run, no third party
ReportGenerator merges the net8.0 and net10.0 Cobertura files (so the figure is the union of both runs, not whichever finished last) and writes a markdown table straight into
$GITHUB_STEP_SUMMARY. It appears on the run page itself. No account, no token, nothing to sign up for.2. Codecov — trend and diff coverage
The thing a job summary can't do: comment on each PR with coverage of the lines that PR changed. A whole-repository percentage is a number people stop seeing after a week; "you added 40 lines, 12 aren't covered" changes review behaviour.
Badge added to the README.
codecov.iois on nuget.org's image allow-list, so it renders on the package page too — the same check that ruled out Scorecard's native badge URL earlier.codecov.yml— deliberately advisoryBoth statuses are
informational: true, so Codecov can never fail a check.Current coverage is 25.2% of lines, 43.9% of branches, and that number misleads in both directions. The code with real logic — the adapter, paging arithmetic, the JSON converters, filter building, retry classification — is well covered; that's where the 98 tests point and where the actual bugs were. The uncovered majority is DTOs with no behaviour and ~14 providers of near-identical passthrough methods. A test over an auto-property asserts that C# assigns fields.
A red X on every PR for missing a threshold nobody chose is noise, and noise gets muted.
patchtargets 80% as a visible signal on new code without blocking anything.tests/,samples/andtools/are excluded from the denominator — none of it is library code a consumer runs.Safety
All three new actions SHA-pinned, consistent with #33. Every workflow re-validated as parseable, and the
Build & testjob name is unchanged — it's named in the branch ruleset, so a rename would make master unmergeable.