File tree Expand file tree Collapse file tree 2 files changed +49
-16
lines changed Expand file tree Collapse file tree 2 files changed +49
-16
lines changed Original file line number Diff line number Diff line change @@ -10,32 +10,43 @@ jobs:
10
10
lint :
11
11
runs-on : ubuntu-latest
12
12
steps :
13
- - uses : actions/checkout@v3
13
+ - uses : actions/checkout@v4
14
14
- name : lint
15
15
uses : reviewdog/action-golangci-lint@v2
16
16
test :
17
17
strategy :
18
18
matrix :
19
19
go_version :
20
- - 1.14.x
21
- - 1.15.x
22
- - 1.16.x
23
- - 1.17.x
20
+ - 1.21.x
21
+ - 1.20.x
22
+ - 1.19.x
24
23
os :
25
24
- ubuntu-latest
26
25
runs-on : ${{ matrix.os }}
27
26
steps :
28
- - uses : actions/checkout@v3
29
- - uses : actions/setup-go@v3
27
+ - uses : actions/checkout@v4
28
+ - uses : actions/setup-go@v5
30
29
with :
31
30
go-version : ${{ matrix.go_version }}
32
- - uses : actions/cache@v3
33
- with :
34
- path : ~/go/pkg/mod
35
- key : ${{ runner.os }}-go-${{ matrix.go_version }}-${{ hashFiles('**/go.sum') }}
36
- restore-keys : |
37
- ${{ runner.os }}-go-${{ matrix.go_version }}
38
31
- name : test
39
- run : go test -race -coverprofile=coverage.txt -covermode=atomic ./...
40
- - uses : codecov/codecov-action@v3
41
- if : matrix.os == 'ubuntu-latest' && matrix.go_version == '1.17.x'
32
+ run : go test -race -coverprofile=cover.out -covermode=atomic ./...
33
+ - uses : actions/upload-artifact@v3
34
+ if : strategy.job-index == 0
35
+ with :
36
+ name : coverage
37
+ path : ./cover.out
38
+ if-no-files-found : error
39
+ report-coverage :
40
+ runs-on : ubuntu-latest
41
+ permissions :
42
+ actions : read
43
+ contents : read
44
+ pull-requests : write
45
+ needs :
46
+ - test
47
+ steps :
48
+ - uses : actions/checkout@v4
49
+ - uses : actions/download-artifact@v3
50
+ with :
51
+ name : coverage
52
+ - uses : k1LoW/octocov-action@v0
Original file line number Diff line number Diff line change
1
+ ---
2
+
3
+ coverage :
4
+ if : true
5
+ codeToTestRatio :
6
+ code :
7
+ - ' **/*.go'
8
+ - ' !**/*_test.go'
9
+ test :
10
+ - ' **/*_test.go'
11
+ testExecutionTime :
12
+ if : true
13
+ diff :
14
+ datastores :
15
+ - artifact://${GITHUB_REPOSITORY}
16
+ report :
17
+ datastores :
18
+ - artifact://${GITHUB_REPOSITORY}
19
+ comment :
20
+ if : is_pull_request
21
+ summary :
22
+ if : is_pull_request
You can’t perform that action at this time.
0 commit comments