Skip to content

Commit 10e98c9

Browse files
committed
chore: simplify CI build matrix
Although we originally thought this would be a useful way to do this, it doesn't enforce the `go.mod` constraints that we'd hoped it would, as Renovate could bump the `go.mod`'s `go` directive, and it means that we have a more explicit, and less magic, setup. Additionally, we need to quote the versions as `1.20` gets interpreted by YAML as `1.2` 🙃
1 parent 38458e2 commit 10e98c9

File tree

4 files changed

+16
-32
lines changed

4 files changed

+16
-32
lines changed

.github/workflows/ci.yml

+4-8
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,17 @@ jobs:
88
fail-fast: false
99
# perform matrix testing to give us an earlier insight into issues with different versions of supported major versions of Go
1010
matrix:
11-
# strategy is used to allow us to pin to a specific Go version, or use the version available in our `go.mod`
12-
strategy: ['go-version']
13-
version: [1.21]
14-
include:
15-
# pick up the Go version from the `go.mod`
16-
- strategy: 'go-version-file'
17-
version: 'go.mod'
11+
version:
12+
- "1.20"
13+
- "1.21"
1814
steps:
1915
- name: Check out source code
2016
uses: actions/checkout@v4
2117

2218
- name: Set up Go
2319
uses: actions/setup-go@v4
2420
with:
25-
${{ matrix.strategy }}: ${{ matrix.version }}
21+
go-version: ${{ matrix.version }}
2622

2723
- name: Test
2824
run: make test

.github/workflows/generate.yml

+4-8
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,17 @@ jobs:
88
fail-fast: false
99
# perform matrix testing to give us an earlier insight into issues with different versions of supported major versions of Go
1010
matrix:
11-
# strategy is used to allow us to pin to a specific Go version, or use the version available in our `go.mod`
12-
strategy: ['go-version']
13-
version: [1.21]
14-
include:
15-
# pick up the Go version from the `go.mod`
16-
- strategy: 'go-version-file'
17-
version: 'go.mod'
11+
version:
12+
- "1.20"
13+
- "1.21"
1814
steps:
1915
- name: Check out source code
2016
uses: actions/checkout@v4
2117

2218
- name: Set up Go
2319
uses: actions/setup-go@v4
2420
with:
25-
${{ matrix.strategy }}: ${{ matrix.version }}
21+
go-version: ${{ matrix.version }}
2622

2723
- name: Run `make generate`
2824
run: make generate

.github/workflows/lint.yml

+4-8
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,17 @@ jobs:
88
fail-fast: false
99
# perform matrix testing to give us an earlier insight into issues with different versions of supported major versions of Go
1010
matrix:
11-
# strategy is used to allow us to pin to a specific Go version, or use the version available in our `go.mod`
12-
strategy: ['go-version']
13-
version: [1.21]
14-
include:
15-
# pick up the Go version from the `go.mod`
16-
- strategy: 'go-version-file'
17-
version: 'go.mod'
11+
version:
12+
- "1.20"
13+
- "1.21"
1814
steps:
1915
- name: Check out source code
2016
uses: actions/checkout@v4
2117

2218
- name: Set up Go
2319
uses: actions/setup-go@v4
2420
with:
25-
${{ matrix.strategy }}: ${{ matrix.version }}
21+
go-version: ${{ matrix.version }}
2622

2723
- name: Run `make lint-ci`
2824
run: make lint-ci

.github/workflows/tidy.yml

+4-8
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,17 @@ jobs:
88
fail-fast: false
99
# perform matrix testing to give us an earlier insight into issues with different versions of supported major versions of Go
1010
matrix:
11-
# strategy is used to allow us to pin to a specific Go version, or use the version available in our `go.mod`
12-
strategy: ['go-version']
13-
version: [1.21]
14-
include:
15-
# pick up the Go version from the `go.mod`
16-
- strategy: 'go-version-file'
17-
version: 'go.mod'
11+
version:
12+
- "1.20"
13+
- "1.21"
1814
steps:
1915
- name: Check out source code
2016
uses: actions/checkout@v4
2117

2218
- name: Set up Go
2319
uses: actions/setup-go@v4
2420
with:
25-
${{ matrix.strategy }}: ${{ matrix.version }}
21+
go-version: ${{ matrix.version }}
2622

2723
- name: Install `tidied`
2824
run: go install gitlab.com/jamietanna/tidied@latest

0 commit comments

Comments
 (0)