actions-marketplace-validations/Vitest Coverage Report

Provide a Vitest Test Coverage Report as Step-Summary and comment in Pull Requests

View on GitHub

Trust Signals

Scorecard Score
not yet scored
Maintenance Recency
Stale
License
None
namedescriptionrequireddefault
github-tokenA github access token with permissions to write to issues. Uses secrets.GITHUB_TOKEN by default.no${{ github.token }}
vite-config-pathThe path to the vite config file. By default, looks for paths by the pattern "vite[st].config.{t|mt|ct|j|mj|cj}s".no
json-summary-pathThe path to the json summary file. Uses "coverage/coverage-summary.json" by default.nocoverage/coverage-summary.json
json-summary-compare-pathThe path to the json summary file of the previous run to get trend indicators.no
json-final-pathThe path to the json final file. Uses "coverage/coverage-final.json" by default.nocoverage/coverage-final.json
file-coverage-modeHow to show summary for files coverage. Options: "none" (no files), "changes" (only changed files), "changes-affected" (changed files and files with coverage changes), "all" (all files). Uses "changes" by default.nochanges
file-coverage-expandedWhen true, the File Coverage section will be expanded by default. When false, the section will be collapsed and require a click to expand. Uses false by default.nofalse
show-uncovered-linesWhen true, the "Uncovered Lines" column is shown in the file coverage table. When false, the column is hidden, reducing table width. Uses true by default.notrue
file-coverage-root-pathThe root (or absolute) part of the path used within the json coverage reports to point to the covered files. You can change this if your reports were generated in a different context (e.g., a docker container) and the absolute paths don't match the current runner's workspace. Uses the runner's workspace path by default.no${{ github.workspace }}
working-directoryWorking directory where to look for the vite config file and the coverage report files. Uses "./" by default.no./
nameThe name of the coverage report. Can be used to execute this action multiple times. no""
pr-numberAn optional, user-defined pull request number to comment on. When using "push" events, use "auto" to try to automatically find a matching PR.no""
comment-onSpecify where you want a comment to appear: "pr" for pull-request (if one can be found), "commit" for the commit in which context the action was run, or "none" for no comments. You can provide a comma-separated list of "pr" and "commit" to comment on both. Uses "pr" by default.nopr
threshold-iconsA JSON object mapping coverage percentage thresholds to status icons for display. This determines the icon shown in coverage reports. Example: "{0: '🔴', 80: '🟠', 90: '🟢'}" shows 🔴 for 0-79%, 🟠 for 80-89%, 🟢 for 90-100%. When both threshold-icons and vitest thresholds are defined, threshold-icons controls the icon while vitest thresholds are shown as targets.no""
comparison-decimal-placesNumber of decimal places to show in comparison percentages. This is especially useful in large projects where even small percentage changes can represent significant coverage differences, such as entire test suites being added or removed. Uses 2 by default.no2

no outputs