File tree 1 file changed +22
-4
lines changed
1 file changed +22
-4
lines changed Original file line number Diff line number Diff line change @@ -2,8 +2,9 @@ name: Checks
2
2
3
3
on :
4
4
push :
5
- workflow_dispatch :
6
- pull_request :
5
+ branches : [coverage-test]
6
+ # workflow_dispatch:
7
+ # pull_request:
7
8
8
9
jobs :
9
10
unit_tests :
35
36
uses : actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
36
37
with :
37
38
go-version-file : go.mod
38
- - name : Go test
39
+ - name : Go test (Linux/macOS)
40
+ if : ${{runner.os != 'Windows'}}
39
41
run : |
40
- go test ./... -race
42
+ go test -v -race -coverprofile=coverage.out ./...
43
+ - name : Go test (Windows)
44
+ if : ${{runner.os == 'Windows'}}
45
+ run : |
46
+ go test -v -race -coverprofile="coverage.out" ./...
47
+ - name : Upload coverage report
48
+ uses : actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808
49
+ with :
50
+ path : coverage.out
51
+ name : coverage-report-${{matrix.target}}
52
+ - name : Display coverage report (Linux/macOS)
53
+ if : ${{runner.os != 'Windows'}}
54
+ run : go tool cover -func=coverage.out
55
+ - name : Display coverage report (Windows)
56
+ if : ${{runner.os == 'Windows'}}
57
+ run : go tool cover -func=coverage.out
58
+ shell : cmd
41
59
42
60
copyright :
43
61
name : " copyright headers"
You can’t perform that action at this time.
0 commit comments