actions-marketplace-validations/Vitest Coverage Report
Provide a Vitest Test Coverage Report as Step-Summary and comment in Pull Requests
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Stale
- License
- None
Inputs
| name | description | required | default |
|---|---|---|---|
| github-token | A github access token with permissions to write to issues. Uses secrets.GITHUB_TOKEN by default. | no | ${{ github.token }} |
| vite-config-path | The 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-path | The path to the json summary file. Uses "coverage/coverage-summary.json" by default. | no | coverage/coverage-summary.json |
| json-summary-compare-path | The path to the json summary file of the previous run to get trend indicators. | no | — |
| json-final-path | The path to the json final file. Uses "coverage/coverage-final.json" by default. | no | coverage/coverage-final.json |
| file-coverage-mode | How 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. | no | changes |
| file-coverage-expanded | When 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. | no | false |
| show-uncovered-lines | When 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. | no | true |
| file-coverage-root-path | The 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-directory | Working directory where to look for the vite config file and the coverage report files. Uses "./" by default. | no | ./ |
| name | The name of the coverage report. Can be used to execute this action multiple times. | no | "" |
| pr-number | An 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-on | Specify 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. | no | pr |
| threshold-icons | A 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-places | Number 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. | no | 2 |
Outputs
no outputs