Skip to content

Commit 347c80f

Browse files
committed
test
1 parent 2c3e299 commit 347c80f

File tree

1 file changed

+28
-3
lines changed

1 file changed

+28
-3
lines changed

.github/workflows/test.yml

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,11 @@ permissions:
55
pull-requests: write
66
jobs:
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

0 commit comments

Comments
 (0)