Skip to content

Commit

Permalink
feat: add support for Go 1.23 (#532)
Browse files Browse the repository at this point in the history
This PR updates our Go tooling version to 1.23 while keeping the minimum
required Go version for dependencies at Go 1.21.
  • Loading branch information
phm07 authored Sep 12, 2024
1 parent 584f6c2 commit 838f878
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.22"
go-version: "1.23"

- uses: golangci/golangci-lint-action@v6
with:
Expand All @@ -26,6 +26,7 @@ jobs:
go-version:
- "1.21"
- "1.22"
- "1.23"

runs-on: ubuntu-latest
steps:
Expand All @@ -49,7 +50,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.22"
go-version: "1.23"
cache: false

- run: go generate ./...
Expand Down
4 changes: 2 additions & 2 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ cache:

build:
stage: build
image: golang:1.22
image: golang:1.23
script:
- go env
- go mod download
Expand All @@ -35,7 +35,7 @@ test:lint:

test:unit:
stage: test
image: golang:1.22
image: golang:1.23
script:
- go test -v -race -coverprofile=coverage.txt -covermode=atomic ./...
- go get github.com/boumenot/gocover-cobertura
Expand Down
4 changes: 4 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ module github.com/hetznercloud/hcloud-go/v2
// It should never be higher than the lowest currently supported version of Go.
go 1.21

// The toolchain version describes which Go version to use for testing, generating etc.
// It should always be the newest version.
toolchain go1.23.1

require (
github.com/google/go-cmp v0.6.0
github.com/jmattheis/goverter v1.5.1
Expand Down

0 comments on commit 838f878

Please sign in to comment.