chore: add PR test action #2
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: '[PR] Test' | ||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
jobs: | ||
test: | ||
name: Run Go unit tests and check package coverage | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout the code | ||
uses: actions/[email protected] | ||
- uses: robherley/go-test-action@v0 | ||
with: | ||
# Relative path to the directory containing the go.mod of the module you wish to test. | ||
# Optional. Default is '.' | ||
moduleDirectory: | ||
# Arguments to pass to go test, -json will be prepended automatically. | ||
# Optional. Default is './...' | ||
testArguments: | ||
- -tags | ||
- testing | ||
- ./... | ||
# Parse an exisiting [test2json](https://pkg.go.dev/cmd/test2json) file, instead of executing go test. | ||
# Will always exit(0) on successful test file parse. | ||
# Optional. No default | ||
fromJSONFile: | ||
# Whitespace separated list of renderable items to omit. | ||
# Valid options to omit are: | ||
# untested: packages that have no tests | ||
# successful: packages that are successful | ||
# pie: mermaid.js pie chart | ||
# pkg-tests: per-package test list | ||
# pkg-output: per-package test output | ||
# stderr: standard error output of `go test` subprocess | ||
# Optional. No default | ||
omit: |