Skip to content

Commit 123f33a

Browse files
committed
use an indirect name for each go version so we don't have to change the set of required checks when we change Go versions
1 parent 8b8fdf5 commit 123f33a

File tree

1 file changed

+15
-6
lines changed

1 file changed

+15
-6
lines changed

.github/workflows/ci.yaml

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,15 @@ permissions:
1212
contents: read
1313
jobs:
1414
ci:
15+
name: ci (go:${{ matrix.go-version.name }})
1516
runs-on: ubuntu-latest
1617
strategy:
1718
matrix:
18-
# when editing this list, also update steps and jobs below
19-
go-version: [1.23.x, 1.24.x]
19+
go-version:
20+
- name: latest
21+
version: 1.24.x
22+
- name: previous
23+
version: 1.23.x
2024
steps:
2125
- name: Checkout Code
2226
uses: actions/checkout@v4
@@ -25,21 +29,26 @@ jobs:
2529
- name: Install Go
2630
uses: actions/setup-go@v5
2731
with:
28-
go-version: ${{ matrix.go-version }}
32+
go-version: ${{ matrix.go-version.version }}
2933
- name: Unit Test
3034
run: make shorttest
3135
- name: Lint
3236
# Often, lint & gofmt guidelines depend on the Go version. To prevent
3337
# conflicting guidance, run only on the most recent supported version.
3438
# For the same reason, only check generated code on the most recent
3539
# supported version.
36-
if: matrix.go-version == '1.24.x'
40+
if: matrix.go-version.name == 'latest'
3741
run: make checkgenerate && make lint
3842
conformance:
43+
name: ci (go:${{ matrix.go-version.name }})
3944
runs-on: ubuntu-latest
4045
strategy:
4146
matrix:
42-
go-version: [1.22.x, 1.23.x, 1.24.x]
47+
go-version:
48+
- name: latest
49+
version: 1.24.x
50+
- name: previous
51+
version: 1.23.x
4352
steps:
4453
- name: Checkout Code
4554
uses: actions/checkout@v4
@@ -48,7 +57,7 @@ jobs:
4857
- name: Install Go
4958
uses: actions/setup-go@v5
5059
with:
51-
go-version: ${{ matrix.go-version }}
60+
go-version: ${{ matrix.go-version.version }}
5261
- name: Run Conformance Tests
5362
run: make runconformance
5463
slowtest:

0 commit comments

Comments
 (0)