wjervis7/Vitest Badge Action
This action parses the json summary created by Vitest, and creates a badge based on the results.
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Stale
- License
- None
Inputs
| name | description | required | default |
|---|---|---|---|
| result-type | Type of result to make badge for. Can be 'lines', 'statements', 'functions', or 'branches'. | yes | — |
| upload-badge | Indicate if badge should be uploaded to Gist. | — | true |
| badge-path | Path to save the temporary badge to. | — | badge.svg |
| gist-token | PAT for writing to gist. | — | — |
| gist-url | Url to Gist. | — | — |
| vitest-config-path | Path to the vitest config file. | — | vitest.config.ts |
| summary-path | Path to the json summary file. | — | ./coverage/coverage-summary.json |
| badge-text | Text to display on badge. | — | Tests |
| badge-pass-color | An array (comma separated) with hex (without #) or named colors of the badge value background, when coverage is at or above the threshold. More than one creates gradient background. | — | 31c653 |
| badge-fail-color | An array (comma separated) with hex (without #) or named colors of the badge value background, when coverage is below the threshold. More than one creates gradient background. | — | 800000 |
| badge-neutral-color | An array (comma separated) with hex (without #) or named colors of the badge value background, when coverage results were not found. More than one creates gradient background. | — | 696969 |
Outputs
no outputs