diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 11be996e..1d2ca99a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -5,6 +5,9 @@ on: branches: [main] pull_request: +env: + GOTOOLCHAIN: local + jobs: build: runs-on: ubuntu-latest @@ -15,7 +18,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v5 with: - go-version-file: go.mod + go-version: "1.23" - name: Run GoReleaser uses: goreleaser/goreleaser-action@v6 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 91654d11..f78e9a50 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,6 +5,9 @@ on: branches: [main] pull_request: +env: + GOTOOLCHAIN: local + jobs: lint: runs-on: ubuntu-latest @@ -15,7 +18,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v5 with: - go-version-file: go.mod + go-version: "1.23" - name: Run gofmt run: diff -u <(echo -n) <(gofmt -d -s .) @@ -37,7 +40,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v5 with: - go-version-file: go.mod + go-version: "1.23" - name: Run tests run: go test -coverpkg=./... -coverprofile=coverage.txt -v -race ./... @@ -59,7 +62,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v5 with: - go-version-file: go.mod + go-version: "1.23" - name: Delete old generated files run: find . -name 'zz_*.go' -delete @@ -82,7 +85,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v5 with: - go-version-file: go.mod + go-version: "1.23" - name: Run go mod tidy run: go mod tidy diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a4760bb2..0858067a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -5,6 +5,9 @@ on: tags: - "v*.*.*" +env: + GOTOOLCHAIN: local + jobs: release: runs-on: ubuntu-latest @@ -15,7 +18,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v5 with: - go-version-file: go.mod + go-version: "1.23" - name: Setup rcodesign uses: hashicorp/action-setup-rcodesign@v1 diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5c3e92e2..c1ad7c88 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -18,7 +18,7 @@ cache: build: stage: build - image: golang:1.21 + image: golang:1.23 script: - go env - go mod download @@ -31,21 +31,21 @@ test:lint: test:tidy: stage: test - image: golang:1.21 + image: golang:1.23 script: - go mod tidy -v - git diff --exit-code test:generate: stage: test - image: golang:1.21 + image: golang:1.23 script: - go generate ./... - git diff --exit-code test:unit: stage: test - image: golang:1.21 + image: golang:1.23 script: - go test -v -coverpkg=./... -coverprofile=coverage.txt -covermode count ./... - go get github.com/boumenot/gocover-cobertura diff --git a/go.mod b/go.mod index c0a446a1..d25358bf 100644 --- a/go.mod +++ b/go.mod @@ -2,6 +2,8 @@ module github.com/hetznercloud/cli go 1.21 +toolchain go1.23.1 + require ( github.com/BurntSushi/toml v1.4.0 github.com/boumenot/gocover-cobertura v1.2.0