Skip to content

chore: add PR test action #3

chore: add PR test action

chore: add PR test action #3

Workflow file for this run

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/checkout@v3.2.0
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache: false
- 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: