Skip to content

Commit f07b654

Browse files
committed
ci: run tests on multiple go versions, oses and archs
1 parent a3012c1 commit f07b654

File tree

1 file changed

+30
-3
lines changed

1 file changed

+30
-3
lines changed

.github/workflows/tests.yml

+30-3
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,25 @@ on:
1313

1414
jobs:
1515
unit:
16-
name: Unit Tests
17-
runs-on: ubuntu-latest
16+
strategy:
17+
matrix:
18+
go-version:
19+
- "1.23"
20+
- "1.24"
21+
os:
22+
- macos
23+
- ubuntu
24+
- windows
25+
goarch:
26+
- 386
27+
- amd64
28+
exclude:
29+
- os: macos
30+
goarch: 386
31+
fail-fast: false
32+
33+
name: Unit Tests (${{ matrix.os }}/go-${{ matrix.go-version }}/${{ matrix.goarch }})
34+
runs-on: ${{ matrix.os }}-latest
1835

1936
steps:
2037
- uses: actions/checkout@v4
@@ -23,7 +40,7 @@ jobs:
2340

2441
- uses: actions/setup-go@v5
2542
with:
26-
go-version-file: go.mod
43+
go-version: ${{ matrix.go-version }}
2744

2845
- name: Install dependencies
2946
run: make get-deps
@@ -32,7 +49,17 @@ jobs:
3249
run: make docker-gen
3350

3451
- name: Check code formatting
52+
if: runner.os != 'Windows'
3553
run: make check-gofmt
3654

3755
- name: Run tests
56+
if: matrix.goarch != 386
3857
run: go test -race -v ./internal/...
58+
env:
59+
GOARCH: ${{ matrix.goarch }}
60+
61+
- name: Run tests (386 arch)
62+
if: matrix.goarch == 386
63+
run: go test -v ./internal/...
64+
env:
65+
GOARCH: ${{ matrix.goarch }}

0 commit comments

Comments
 (0)