File tree Expand file tree Collapse file tree 1 file changed +23
-4
lines changed
Expand file tree Collapse file tree 1 file changed +23
-4
lines changed Original file line number Diff line number Diff line change 1- on : [push, pull_request]
1+ on :
2+ push :
3+ branches :
4+ - master
5+ pull_request :
6+ branches :
7+ - master
8+
29name : tests
310
411jobs :
512 test :
613 strategy :
714 matrix :
8- go-version : [1.x, 1.14 .x]
15+ go-version : [1.x, 1.15 .x]
916 platform : [ubuntu-latest]
17+ include :
18+ # only update test coverage stats with most recent go version on linux
19+ - go-version : 1.x
20+ platform : ubuntu-latest
21+ update-coverage : true
1022 runs-on : ${{ matrix.platform }}
1123
1224 steps :
25+ - name : Cancel previous workflow runs
26+ uses : styfle/cancel-workflow-action@0.8.0
27+ with :
28+ access_token : ${{ github.token }}
29+
30+ - uses : actions/checkout@v2
1331 - uses : actions/setup-go@v2
1432 with :
1533 go-version : ${{ matrix.go-version }}
16- - uses : actions/checkout@v2
34+ - run : go version
1735
1836 - name : Cache go modules
1937 uses : actions/cache@v2
2038 with :
2139 path : ~/go/pkg/mod
22- key : ${{ runner.os }}-go-${{ hashFiles('go.sum') }}
40+ key : ${{ runner.os }}-go-${{ hashFiles('**/ go.sum') }}
2341 restore-keys : ${{ runner.os }}-go-
2442
2543 - name : Run go test
2644 run : go test -v -race -coverprofile coverage.txt -covermode atomic ./...
2745
2846 - name : Upload coverage to Codecov
47+ if : ${{ matrix.update-coverage }}
2948 uses : codecov/codecov-action@v1
You can’t perform that action at this time.
0 commit comments