File tree Expand file tree Collapse file tree 1 file changed +55
-0
lines changed Expand file tree Collapse file tree 1 file changed +55
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Go Test
2+
3+ on :
4+ push :
5+ branches :
6+ - master
7+ pull_request :
8+
9+ jobs :
10+ test :
11+ runs-on : ubuntu-latest
12+ strategy :
13+ matrix :
14+ go-version :
15+ - " 1.18"
16+ - " 1.19"
17+ - " 1.20"
18+ - " 1.21"
19+ - " 1.22"
20+ - " 1.23"
21+ - " 1.24"
22+ env :
23+ GOLANGCI_LINT_VERSION : v1.64.5
24+
25+ steps :
26+ - name : Install Go
27+ if : success()
28+ uses : actions/setup-go@v5
29+ with :
30+ go-version : ${{ matrix.go-version }}
31+
32+ - name : Checkout code
33+ uses : actions/checkout@v4
34+
35+ - name : Cache Go modules
36+ uses : actions/cache@v4
37+ with :
38+ path : ~/go/pkg/mod
39+ key : ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
40+ restore-keys : |
41+ ${{ runner.os }}-go-
42+
43+ - name : Run linter
44+ uses : golangci/golangci-lint-action@v6
45+ with :
46+ version : ${{ env.GOLANGCI_LINT_VERSION }}
47+
48+ - name : Run tests
49+ run : go run gotest.tools/gotestsum@latest --junitfile tests.xml --format pkgname -- -cover -race ./...
50+
51+ - name : Test Summary
52+ uses : test-summary/action@v2
53+ with :
54+ paths : " tests.xml"
55+ if : always()
You can’t perform that action at this time.
0 commit comments