99 - master
1010
1111jobs :
12+ lint :
13+ runs-on : ubuntu-latest
14+ steps :
15+ - name : Setup go
16+ uses : actions/setup-go@v2
17+ with :
18+ go-version : ' ^1.16'
19+ - name : Checkout repository
20+ uses : actions/checkout@v2
21+ - name : Setup golangci-lint
22+ uses : golangci/golangci-lint-action@v2
23+ with :
24+ version : v1.41.1
25+ args : --verbose
1226 test :
1327 strategy :
1428 matrix :
1529 os : [ubuntu-latest]
16- go : [1.13, 1.14, 1.15, 1.16]
30+ go : [1.13, 1.14, 1.15, 1.16, 1.17]
31+ include :
32+ - os : ubuntu-latest
33+ go-build : ~/.cache/go-build
34+ - os : macos-latest
35+ go-build : ~/Library/Caches/go-build
1736 name : ${{ matrix.os }} @ Go ${{ matrix.go }}
1837 runs-on : ${{ matrix.os }}
19-
2038 env :
2139 GO111MODULE : on
2240 TESTTAGS : ${{ matrix.test-tags }}
@@ -32,14 +50,19 @@ jobs:
3250 with :
3351 ref : ${{ github.ref }}
3452
35- - name : golangci-lint
36- uses : golangci/golangci-lint-action@v2
53+ - uses : actions/cache@v2
3754 with :
38- version : v1.41.1
39-
55+ path : |
56+ ${{ matrix.go-build }}
57+ ~/go/pkg/mod
58+ key : ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
59+ restore-keys : |
60+ ${{ runner.os }}-go-
4061 - name : Run Tests
4162 run : |
42- go test -v -covermode=atomic -coverprofile=coverage.out ./...
63+ go test -v -covermode=atomic -coverprofile=coverage.out
4364
4465 - name : Upload coverage to Codecov
45- uses : codecov/codecov-action@v1
66+ uses : codecov/codecov-action@v2
67+ with :
68+ flags : ${{ matrix.os }},go-${{ matrix.go }},${{ matrix.test-tags }}
0 commit comments