-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (48 loc) · 1.31 KB
/
test.yml
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
44
45
46
47
48
49
50
51
52
53
54
55
name: Test
on:
push:
paths: ["**.go", "go.mod", ".github/workflows/*"]
jobs:
test:
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- windows-latest
- macos-latest
go:
- "1.19"
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 1
- name: setup Go
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go }}
- name: test
if: runner.os != 'Windows'
run: |
go install github.com/jstemmer/go-junit-report/v2@latest
go test -v -race ./... 2>&1 | go-junit-report -set-exit-code -iocopy -out report.xml
- name: test-windows
if: runner.os == 'Windows'
run: |
go install github.com/jstemmer/go-junit-report/v2@latest
go test -v ./... 2>&1 | go-junit-report -set-exit-code -iocopy -out report.xml
- name: Test Report
uses: dorny/test-reporter@v1
with:
name: ${{ matrix.os }} Tests
path: report.xml
reporter: java-junit
fail-on-error: "false"
if: always()
- name: Test Summary
uses: test-summary/action@v1
with:
paths: report.xml
if: always()