Skip to content

Commit 1bc7c48

Browse files
committed
ci: run tests on multiple go versions and oses
1 parent 2d2c9c0 commit 1bc7c48

File tree

2 files changed

+17
-5
lines changed

2 files changed

+17
-5
lines changed

.github/workflows/tests.yml

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,19 @@ 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+
fail-fast: false
26+
27+
name: Unit Tests (${{ matrix.os }}/go-${{ matrix.go-version }})
28+
runs-on: ${{ matrix.os }}-latest
1829

1930
steps:
2031
- uses: actions/checkout@v4
@@ -23,7 +34,7 @@ jobs:
2334

2435
- uses: actions/setup-go@v5
2536
with:
26-
go-version-file: go.mod
37+
go-version: ${{ matrix.go-version }}
2738

2839
- name: Install dependencies
2940
run: make get-deps
@@ -32,7 +43,8 @@ jobs:
3243
run: make docker-gen
3344

3445
- name: Check code formatting
46+
if: runner.os != 'Windows'
3547
run: make check-gofmt
3648

3749
- name: Run tests
38-
run: go test -race -v ./internal/...
50+
run: make test

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,4 +62,4 @@ check-gofmt:
6262
fi
6363

6464
test:
65-
go test -race ./internal/...
65+
go test -v ./internal/...

0 commit comments

Comments
 (0)