-
Notifications
You must be signed in to change notification settings - Fork 128
91 lines (87 loc) · 2.94 KB
/
go-multierror.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
name: hashicorp/go-multierror/go-multierror
on:
push:
permissions:
contents: read
jobs:
go-fmt:
runs-on: ubuntu-latest
steps:
- run: go version
- uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3
- uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4.0.0
with:
go-version-file: go.mod
- name: check go fmt
run: |-
files="$(go fmt ./...)"
if [ -n "$files" ]; then
echo "The following file(s) do not conform to go fmt:"
echo "$files"
exit 1
fi
linux-tests:
runs-on: ubuntu-latest
env:
TEST_RESULTS_PATH: '/tmp/test-results'
strategy:
matrix:
go-version:
- '1.13' # oldest supported; named in go.mod
- 'oldstable'
- 'stable'
steps:
- uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3
- uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4.0.0
with:
go-version: ${{ matrix.go-version }}
- uses: autero1/action-gotestsum@7263b9d73912eec65f46337689e59fac865c425f # v2.0.0
with:
gotestsum_version: 1.9.0
- run: |
go version
go env
- run: mkdir -p "$TEST_RESULTS_PATH/go-multierror"
- name: Run go tests
env:
PLATFORM: linux
REPORT_FILE: ${{ env.TEST_RESULTS_PATH }}/go-multierror/gotestsum-report.xml
run: |-
gotestsum --format=short-verbose --junitfile ${{ env.REPORT_FILE }} -- -p 2 ./...
- uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
with:
path: ${{ env.TEST_RESULTS_PATH }}
name: tests-linux
windows-tests:
runs-on: windows-latest
env:
TEST_RESULTS_PATH: 'c:\Users\runneradmin\AppData\Local\Temp\test-results'
strategy:
matrix:
go-version:
- '1.13' # oldest supported; named in go.mod
- 'oldstable'
- 'stable'
steps:
- uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3
- uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4.0.0
with:
go-version: ${{ matrix.go-version }}
- run: |
go version
go env
- run: git config --global core.autocrlf false
- run: go mod download
- uses: autero1/action-gotestsum@7263b9d73912eec65f46337689e59fac865c425f # v2.0.0
with:
gotestsum_version: 1.9.0
- name: Run go tests
env:
PLATFORM: win
REPORT_FILE: ${{ env.TEST_RESULTS_PATH }}/go-multierror/gotestsum-report.xml
run: |-
gotestsum.exe --format=short-verbose --junitfile ${{ env.REPORT_FILE }} -- -p 2 ./...
- uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
with:
path: ${{ env.TEST_RESULTS_PATH }}
name: tests-windows