File tree Expand file tree Collapse file tree 1 file changed +28
-3
lines changed Expand file tree Collapse file tree 1 file changed +28
-3
lines changed Original file line number Diff line number Diff line change @@ -5,8 +5,11 @@ permissions:
55 pull-requests : write
66jobs :
77 test :
8- name : test
9- runs-on : ubuntu-latest
8+ runs-on : ${{ matrix.os }}
9+ strategy :
10+ matrix :
11+ os : [ubuntu-latest, macos-latest]
12+
1013 steps :
1114 - name : checkout
1215 uses : actions/checkout@v4
@@ -18,13 +21,35 @@ jobs:
1821 - name : test
1922 env :
2023 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }} # Needed for GitHub badge storer integration test
21- run : make test
24+ run : go test -timeout=60s -race -count=1 -failfast -shuffle=on ./... -coverprofile=./cover.${{ matrix.os }}.profile -covermode=atomic -coverpkg=./...
25+
26+ - name : upload cover profile artifact
27+ uses : actions/upload-artifact@v3
28+ with :
29+ name : cover.${{ matrix.os }}
30+ path : cover.${{ matrix.os }}.profile
31+
32+ check-coverage :
33+ runs-on : ubuntu-latest
34+ needs : test
35+
36+ steps :
37+ - name : download cover.ubuntu-latest
38+ uses : actions/download-artifact@v3
39+ with :
40+ name : cover.ubuntu-latest
2241
42+ - name : download cover.macos-latest
43+ uses : actions/download-artifact@v3
44+ with :
45+ name : cover.macos-latest
46+
2347 - name : check test coverage
2448 id : coverage
2549 uses : vladopajic/go-test-coverage@v2
2650 with :
2751 config : ./.github/.testcoverage.yml
52+ profile : cover.ubuntu-latest.profile,cover.macos-latest.profile
2853 git-branch : badges
2954 git-token : ${{ github.ref_name == 'main' && secrets.GITHUB_TOKEN || '' }}
3055
You can’t perform that action at this time.
0 commit comments