Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
6 changes: 3 additions & 3 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
name: Test
strategy:
matrix:
go-version: [1.24.x, 1.25.x]
go-version: [1.25.x, 1.26.x]
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.x
Expand Down Expand Up @@ -54,7 +54,7 @@ jobs:
- name: Run linter
uses: golangci/golangci-lint-action@v8
with:
version: v2.6.2
version: v2.11.3
regenerate:
name: Regenerate
runs-on: ubuntu-latest
Expand All @@ -64,7 +64,7 @@ jobs:
- name: Set up Go 1.x
uses: actions/setup-go@v5
with:
go-version: 1.25.x
go-version: 1.26.x
- name: Install schematyper
run: |
# "go install github.com/idubinskiy/schematyper:latest" fails with
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ignition-validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
name: Test ignition-validate
strategy:
matrix:
go-version: [1.25.x]
go-version: [1.26.x]
os: [macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
Expand Down
2 changes: 2 additions & 0 deletions docs/release-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ nav_order: 9

### Changes

- Fix test script compatibility with Go 1.26 which removed the `-go` flag from `go tool fix`

### Bug fixes


Expand Down
11 changes: 10 additions & 1 deletion test
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,16 @@ PKG_VET=$(go list ./... | \

echo "Checking gofix..."
go_version=$(go version | awk '{print $3}')
go tool fix -go="$go_version" -diff $SRC
# Go 1.26+ removed the -go flag from go tool fix
go_major=$(echo "$go_version" | sed 's/go\([0-9]*\)\.\([0-9]*\).*/\1/')
go_minor=$(echo "$go_version" | sed 's/go\([0-9]*\)\.\([0-9]*\).*/\2/')
if [ "$go_major" -lt 1 ] || { [ "$go_major" -eq 1 ] && [ "$go_minor" -lt 26 ]; }; then
go tool fix -go="$go_version" -diff $SRC
else
# Go 1.26+ uses unitchecker and exits non-zero when it finds fixable issues
# Make this non-fatal since finding fixable code shouldn't fail the build
go tool fix -diff $SRC || true
fi

echo "Checking gofmt..."
res=$(gofmt -d -e -s $SRC)
Expand Down
Loading