-
Notifications
You must be signed in to change notification settings - Fork 304
Code coverage results are not visible in PRs or build summaries #7553
Copy link
Copy link
Closed
Description
Problem
Currently, code coverage data is collected during CI builds but the results are not surfaced where developers can easily see them:
- GitHub Actions (dotnet.yml): Coverage is collected and a report is generated, but it is only uploaded as a build artifact. Developers must download and extract the artifact to view results. There is no coverage summary in the PR or job summary.
- Azure DevOps (ci-build.yml): The test step does not collect code coverage at all, so no coverage data is available in the build or PR.
Impact
Without visible coverage results, developers cannot quickly assess whether a PR maintains or improves test coverage. This reduces the effectiveness of code review and makes it harder to catch coverage regressions.
Proposed Solution
- GitHub Actions: Add
MarkdownSummaryGithubreport type to ReportGenerator, write the summary to\, and post it as a sticky PR comment usingmarocchino/sticky-pull-request-comment. - Azure DevOps: Add
--collect:"XPlat Code Coverage"to the test step, install and run ReportGenerator to merge coverage files, and publish results using thePublishCodeCoverageResults@2task so coverage appears in the build's Code Coverage tab and PR diffs.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
Done ✔️