feat(ci): report test coverage on PRs#1437
Open
dawsontoth wants to merge 1 commit into
Open
Conversation
Run vitest with coverage in Verify PR and surface the results with vitest-coverage-report-action: a sticky PR comment plus the workflow job summary, with per-file detail for changed files. Adds the json-summary and json coverage reporters the action reads (lcov stays for Sonar) and reportOnFailure so coverage still posts when tests fail. Closes #1319 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Code Review
This pull request updates the Vitest configuration in vitest.config.ts to include json-summary and json coverage reporters, and enables reportOnFailure to ensure coverage reports are generated even when tests fail. There are no review comments, and I have no feedback to provide.
Coverage Report
File CoverageNo changed files found. |
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
Surfaces vitest coverage in CI, outside of Sonar (closes #1319):
pnpm test:coverageinstead ofpnpm test.davelosert/vitest-coverage-report-action, pinned to the v2.12.1 commit SHA like the other actions) posts a sticky PR comment with the coverage table — statements/branches/functions/lines plus per-file detail for files changed in the PR — and writes the same table to the workflow job summary.vitest.config.tsadds thejson-summaryandjsoncoverage reporters the action reads (lcovstays for Sonar), plusreportOnFailure: trueso coverage still posts when tests fail (the report step runsif: always()).permissionsblock (contents: read,pull-requests: write) so the action can create/update its comment.Notes
pnpm test:coverageproducescoverage/coverage-summary.jsonandcoverage/coverage-final.json, the action's default input paths;/coverageis already gitignored.🤖 Generated with Claude Code