actions-marketplace-validations/Go Coverage
Generates Go coverage reports without third party services
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Stale
- License
- None
Inputs
| name | description | required | default |
|---|---|---|---|
| token | github token | — | ${{ github.token }} |
| report-url | URL of final uploaded report. e.g. https://reports.example.com/{{ $github.sha }}/cover.html | no | — |
| working-directory | Working directory. Defaults to project root | no | "" |
| report-filename | File or pathname for the resulting html coverage report | no | go-coverage.html |
| cover-mode | Parameter to pass to go tests -covermode argument. Either count, set or atomic | — | count |
| cover-pkg | Parameter to pass to go tests -coverpkg argument. Leave empty to omit flag | — | "" |
| test-args | Additional build arguments to pass to go test | no | [] |
| test-pkgs | Package names to test, passed to go test - Multiple arguments should be separated by newlines | no | ./... |
| coverage-threshold | Fail the build if the coverage drops below supplied percentage | no | 0 |
| fail-coverage | Fail the build if coverage drops below coverage-threshold. One of "always", "never" or "only_pull_requests" | no | only_pull_requests |
| add-comment | Adds a comment to the PR with coverage information if true. If false will only add an action summary report | no | true |
| ignore-pattern | One or more regular expressions matching filenames to exclude from coverage statistics (e.g. for generated Go files) | no | "" |
| notes-ref | The refname to use for the git notes. Defaults to gocoverage | no | gocoverage |
Outputs
| name | description |
|---|---|
| report-pathname | The full pathname of the generated coverage report |
| gocov-pathname | The full pathname of the raw .cov coverage data |
| gocov-agg-pathname | The full pathname of the aggregated .cov coverage data |
| coverage-pct | The coverage figure for the whole project. e.g "83.478" |
| coverage-pct-0dp | The coverage figure for the whole project rounded to the nearest integer. e.g "83" |
| coverage-pct-1dp | The coverage figure for the whole project rounded to 1 decimal place. e.g "83.5" |
| meets-threshold | Set to true if the current coverage is greater than coverage-threshold |
| coverage-last-pct | The prior coverage percentage |
| coverage-last-pct-0dp | The prior coverage percentage rounded to the nearest integer |
| coverage-last-pct-1dp | The prior coverage percentage rounded to 1 decimal place |
| coverage-last-sha | Commit sha prior coverage was recorded at |
| coverage-delta | Amount coverage has changed |
| package-count | Number of Go packages scanned |
| uncovered-packages | Number of Go packages with no test coverage |