Skip to content

Commit ed1d360

Browse files
authored
Simplify the matrix config for go test (#21)
The matrix approach is fragile and does not work. Explicitly define each.
1 parent ae941b7 commit ed1d360

1 file changed

Lines changed: 20 additions & 15 deletions

File tree

.github/workflows/go-test.yml

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -18,21 +18,9 @@ on:
1818

1919
jobs:
2020
test:
21-
name: ${{ matrix.name }}
21+
name: Test
2222
runs-on: ubuntu-latest
23-
if: inputs.test || inputs.race
24-
strategy:
25-
fail-fast: false
26-
matrix:
27-
include:
28-
- name: Test
29-
flags: ''
30-
enabled: ${{ inputs.test }}
31-
- name: Test (race)
32-
flags: '-race'
33-
enabled: ${{ inputs.race }}
34-
exclude:
35-
- enabled: false
23+
if: inputs.test
3624
steps:
3725
- name: Checkout code
3826
uses: actions/checkout@v6
@@ -44,4 +32,21 @@ jobs:
4432
uses: ./.github/actions/go-test-setup
4533
if: hashFiles('./.github/actions/go-test-setup') != ''
4634
- name: Run tests
47-
run: go test ${{ matrix.flags }} ./...
35+
run: go test ./...
36+
37+
race:
38+
name: Test (race)
39+
runs-on: ubuntu-latest
40+
if: inputs.race
41+
steps:
42+
- name: Checkout code
43+
uses: actions/checkout@v6
44+
- name: Set up Go
45+
uses: actions/setup-go@v6
46+
with:
47+
go-version: '${{ inputs.go-version }}'
48+
- name: Run repo-specific setup
49+
uses: ./.github/actions/go-test-setup
50+
if: hashFiles('./.github/actions/go-test-setup') != ''
51+
- name: Run tests
52+
run: go test -race ./...

0 commit comments

Comments
 (0)