Skip to content

Commit 032d47e

Browse files
committed
Add dynamic Go version matrix to workflow and switch test execution to Ginkgo
Runs all minor versions from that in the go directive to the latest stable
1 parent d64418e commit 032d47e

1 file changed

Lines changed: 24 additions & 10 deletions

File tree

.github/workflows/go.yml

Lines changed: 24 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,33 @@ on:
1010
branches: [ "master" ]
1111

1212
jobs:
13+
go-versions:
14+
name: Lookup Go versions
15+
runs-on: ubuntu-latest
16+
outputs:
17+
matrix: ${{ steps.versions.outputs.matrix }}
18+
steps:
19+
- uses: actions/checkout@v3
20+
- uses: arnested/go-version-action@v2
21+
id: versions
1322

1423
build:
24+
name: Test
1525
runs-on: ubuntu-latest
26+
needs: go-versions
27+
strategy:
28+
matrix:
29+
version: ${{ fromJSON(needs.go-versions.outputs.matrix) }}
1630
steps:
17-
- uses: actions/checkout@v3
18-
19-
- name: Set up Go
20-
uses: actions/setup-go@v5
21-
with:
22-
go-version: oldstable
31+
- uses: actions/checkout@v3
32+
- name: Set up Go
33+
uses: actions/setup-go@v5
34+
with:
35+
go-version: ${{ matrix.version }}
36+
check-latest: true
2337

24-
- name: Build
25-
run: go build -v ./...
38+
- name: Build
39+
run: go build -v ./...
2640

27-
- name: Test
28-
run: go test -v ./...
41+
- name: Test
42+
run: go run github.com/onsi/ginkgo/v2/ginkgo -v -r --randomize-suites --randomize-all -race

0 commit comments

Comments
 (0)