Skip to content

Commit d6fde2d

Browse files
wikkykclaude
andcommitted
ci(test): matrix go image to 1.25 and 1.26.3 (#754)
Run tests under both supported Go versions. Coverage artifact is named per version; sonar consumes coverage-1.26. The go/1.26 PR label marks code that requires Go 1.26+, making the 1.25 job non-blocking. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent e90a70d commit d6fde2d

1 file changed

Lines changed: 13 additions & 3 deletions

File tree

.github/workflows/test.yml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,18 @@ jobs:
8787
if: always() && (needs.pre-screen.result == 'success' || needs.pre-screen.result == 'skipped')
8888
runs-on: ubuntu-latest
8989
permissions: {}
90+
strategy:
91+
fail-fast: false
92+
matrix:
93+
include:
94+
- go: "1.25"
95+
image: golang@sha256:298734aec230b5f3e8cee450ce6d7eccc39f1797ba548ee90d57e9803030c6c3 # 1.25-bookworm
96+
- go: "1.26"
97+
image: golang@sha256:a085df697019cb63b40a70f6a92b948f7dc9df96dfcb2c20ba6eed25ce28f5b3 # 1.26.3-trixie
98+
# Allow the 1.25 job to fail on PRs labelled go/1.26 (code requires 1.26+).
99+
continue-on-error: ${{ matrix.go == '1.25' && contains(github.event.pull_request.labels.*.name, 'go/1.26') }}
90100
container:
91-
image: golang@sha256:298734aec230b5f3e8cee450ce6d7eccc39f1797ba548ee90d57e9803030c6c3 # 1.25-bookworm
101+
image: ${{ matrix.image }}
92102
env:
93103
GOTOOLCHAIN: local
94104
steps:
@@ -106,7 +116,7 @@ jobs:
106116

107117
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
108118
with:
109-
name: coverage
119+
name: coverage-${{ matrix.go }}
110120
path: cover.out
111121
retention-days: 7
112122

@@ -142,7 +152,7 @@ jobs:
142152

143153
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
144154
with:
145-
name: coverage
155+
name: coverage-1.26
146156
path: ${{ runner.temp }}/coverage
147157

148158
# fail-fast against malformed coverage file

0 commit comments

Comments
 (0)