Skip to content

Commit 11c4497

Browse files
committed
workflow updated
1 parent 5c140ce commit 11c4497

File tree

1 file changed

+22
-4
lines changed

1 file changed

+22
-4
lines changed

Diff for: .github/workflows/checks.yml

+22-4
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@ name: Checks
22

33
on:
44
push:
5-
workflow_dispatch:
6-
pull_request:
5+
branches: [coverage-test]
6+
#workflow_dispatch:
7+
#pull_request:
78

89
jobs:
910
unit_tests:
@@ -35,9 +36,26 @@ jobs:
3536
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
3637
with:
3738
go-version-file: go.mod
38-
- name: Go test
39+
- name: Go test (Linux/macOS)
40+
if: ${{runner.os != 'Windows'}}
3941
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
4159

4260
copyright:
4361
name: "copyright headers"

0 commit comments

Comments
 (0)