lfreleng-actions/🧪 Go Test
Runs go test with coverage and race detection support
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Activelast commit Jul 9, 2026
- License
- None
Pinned Snippet
uses: lfreleng-actions/go-test-action@d4a80d07f236bb91e2bf0e00fdcbbaf303938941 # v0.0.1tags can be moved; commit SHAs can't. why a SHA?
Inputs
| name | description | required | default |
|---|---|---|---|
| go_version | Explicit Go version to install; takes precedence over go_version_file | no | "" |
| go_version_file | File to read the Go version from, relative to path_prefix | no | go.mod |
| path_prefix | Project directory; must resolve within the workspace | no | . |
| coverage | Collect coverage with -coverprofile: 'true' or 'false' | no | true |
| race | Enable the race detector: 'true' or 'false' | no | true |
| test_args | Extra go test flags; allowed characters: A-Z a-z 0-9 space . _ / = , : @ + - | no | "" |
| test_target | Space-separated package pattern(s) to test; tokens must not start with '-'; allowed characters: A-Z a-z 0-9 space . _ / - | no | ./... |
| timeout | Go test timeout as a Go duration string, e.g. 10m or 1h30m | no | 10m |
| make_args | When set, run the project's Makefile via make-action instead of the built-in 'go test' (a build+test hook for projects that must run build steps first, e.g. compiling Go plugins). Runs 'make -C <path_prefix> <make_args>'. The coverage, race, test_args, test_target and timeout inputs do not apply on this path; the Makefile controls the run. Must not include -C/--directory. Allowed characters: A-Z a-z 0-9 space . _ / = , : @ + - | no | "" |
| permit_fail | Report test failures without failing the action: 'true' or 'false' | no | false |
| artifact_upload | Upload the coverage profile as an artifact; requires coverage; skips when the run produced no profile | no | false |
| artifact_name | Artifact name; allowed characters: A-Z a-z 0-9 . _ - | no | go-coverage |
Outputs
| name | description |
|---|---|
| tests_passed | Whether the test run passed: 'true' or 'false' |
| coverage_percent | Total coverage percentage from go tool cover; empty when coverage is off, 0 when the run produced no profile |