-
Notifications
You must be signed in to change notification settings - Fork 1.3k
43 lines (38 loc) · 1.4 KB
/
test_pr.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
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: