Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
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` 🙃
  • Loading branch information
jamietanna committed Feb 10, 2024
commit 4f0178b5cab6c8e04b7f60bcc8decee38e862176
12 changes: 4 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,17 @@ jobs:
fail-fast: false
# perform matrix testing to give us an earlier insight into issues with different versions of supported major versions of Go
matrix:
# strategy is used to allow us to pin to a specific Go version, or use the version available in our `go.mod`
strategy: ['go-version']
version: [1.21]
include:
# pick up the Go version from the `go.mod`
- strategy: 'go-version-file'
version: 'go.mod'
version:
- "1.20"
- "1.21"
steps:
- name: Check out source code
uses: actions/checkout@v3

- name: Set up Go
uses: actions/setup-go@v3
with:
${{ matrix.strategy }}: ${{ matrix.version }}
go-version: ${{ matrix.version }}

- name: Test
run: make test
12 changes: 4 additions & 8 deletions .github/workflows/generate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,17 @@ jobs:
fail-fast: false
# perform matrix testing to give us an earlier insight into issues with different versions of supported major versions of Go
matrix:
# strategy is used to allow us to pin to a specific Go version, or use the version available in our `go.mod`
strategy: ['go-version']
version: [1.21]
include:
# pick up the Go version from the `go.mod`
- strategy: 'go-version-file'
version: 'go.mod'
version:
- "1.20"
- "1.21"
steps:
- name: Check out source code
uses: actions/checkout@v3

- name: Set up Go
uses: actions/setup-go@v3
with:
${{ matrix.strategy }}: ${{ matrix.version }}
go-version: ${{ matrix.version }}

- name: Run `make generate`
run: make generate
Expand Down
12 changes: 4 additions & 8 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,17 @@ jobs:
fail-fast: false
# perform matrix testing to give us an earlier insight into issues with different versions of supported major versions of Go
matrix:
# strategy is used to allow us to pin to a specific Go version, or use the version available in our `go.mod`
strategy: ['go-version']
version: [1.21]
include:
# pick up the Go version from the `go.mod`
- strategy: 'go-version-file'
version: 'go.mod'
version:
- "1.20"
- "1.21"
steps:
- name: Check out source code
uses: actions/checkout@v3

- name: Set up Go
uses: actions/setup-go@v3
with:
${{ matrix.strategy }}: ${{ matrix.version }}
go-version: ${{ matrix.version }}

- name: Run `make lint-ci`
run: make lint-ci
12 changes: 4 additions & 8 deletions .github/workflows/tidy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,17 @@ jobs:
fail-fast: false
# perform matrix testing to give us an earlier insight into issues with different versions of supported major versions of Go
matrix:
# strategy is used to allow us to pin to a specific Go version, or use the version available in our `go.mod`
strategy: ['go-version']
version: [1.21]
include:
# pick up the Go version from the `go.mod`
- strategy: 'go-version-file'
version: 'go.mod'
version:
- "1.20"
- "1.21"
steps:
- name: Check out source code
uses: actions/checkout@v3

- name: Set up Go
uses: actions/setup-go@v3
with:
${{ matrix.strategy }}: ${{ matrix.version }}
go-version: ${{ matrix.version }}

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