Skip to content

Commit 74ec800

Browse files
committed
Simplify go-test workflow
- Split the race test to run separately. - Stops macOS and Windows runners from ever starting.
1 parent c82f0f6 commit 74ec800

File tree

2 files changed

+37
-13
lines changed

2 files changed

+37
-13
lines changed

.github/workflows/go-test-config.json

Lines changed: 0 additions & 4 deletions
This file was deleted.

.github/workflows/go-test.yml

Lines changed: 37 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Go Test
1+
name: Go Tests
22

33
on:
44
pull_request:
@@ -10,12 +10,40 @@ on:
1010
permissions:
1111
contents: read
1212

13-
concurrency:
14-
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event_name == 'push' && github.sha || github.ref }}
15-
cancel-in-progress: true
16-
1713
jobs:
18-
go-test:
19-
uses: ipdxco/unified-github-workflows/.github/workflows/go-test.yml@v1.0
20-
secrets:
21-
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
14+
test:
15+
runs-on: ubuntu-latest
16+
strategy:
17+
fail-fast: false
18+
matrix:
19+
go:
20+
- { go-version: stable }
21+
- { go-version: oldstable }
22+
- { go-version-file: go.mod }
23+
steps:
24+
- uses: actions/checkout@v5
25+
with:
26+
persist-credentials: false
27+
- uses: actions/setup-go@v6
28+
with:
29+
go-version: ${{ matrix.go.go-version }}
30+
go-version-file: ${{ matrix.go.go-version-file }}
31+
- uses: geomys/sandboxed-step@v1.1.1
32+
with:
33+
run: |
34+
go test ./...
35+
test-race:
36+
runs-on: ubuntu-latest
37+
strategy:
38+
fail-fast: false
39+
steps:
40+
- uses: actions/checkout@v5
41+
with:
42+
persist-credentials: false
43+
- uses: actions/setup-go@v6
44+
with:
45+
go-version: stable
46+
- uses: geomys/sandboxed-step@v1.1.1
47+
with:
48+
run: |
49+
CGO_ENABLED=1 go test -race ./...

0 commit comments

Comments
 (0)