Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/n8maninger/action-golang-test
Adds annotations from go test to GitHub actions
https://github.com/n8maninger/action-golang-test
Last synced: about 1 month ago
JSON representation
Adds annotations from go test to GitHub actions
- Host: GitHub
- URL: https://github.com/n8maninger/action-golang-test
- Owner: n8maninger
- License: mit
- Created: 2021-05-03T08:04:53.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-03-27T14:58:16.000Z (10 months ago)
- Last Synced: 2024-12-06T06:33:07.457Z (about 1 month ago)
- Language: TypeScript
- Homepage:
- Size: 557 KB
- Stars: 5
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# golang-test
This action runs `go test` and provides annotations from the output
## Inputs
All inputs are optional
| Input | Type | Description | Default
--|--|--|--
package | string | the package to run tests for | ./...
args | string | semicolon delimited `go test` command line arguments |
show-long-running-tests | number | outputs a yellow warning for tests that take longer than the given number of seconds to complete, -1 to disable | 30
show-package-output | bool | includes additional package output in the log | false
show-passed-tests | bool | hides output from passed tests in the log | true
show-stdout | bool | shows the unparsed stdout from `go test` instead of the parsed output | false
working-directory | string | sets the working directory to run tests in. Primarily useful for testing mono-repos. | .## Usage
Basic:
```yml
name: Test
on:
pull_request:
branches: [ master ]
push:
branches: [ master ]jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
- uses: n8maninger/action-golang-test@v1
```Pass command line arguments:
```yml
name: Test
on:
pull_request:
branches: [ master ]
push:
branches: [ master ]jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
- uses: n8maninger/action-golang-test@v1
with:
args: "-race;-failfast;-tags=testing debug netgo"
```