Skip to content

Commit

Permalink
ci: build and test with Go 1.23
Browse files Browse the repository at this point in the history
  • Loading branch information
phm07 committed Sep 16, 2024
1 parent 7495b14 commit 6fbed51
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,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
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,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 .)
Expand All @@ -37,7 +37,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 ./...
Expand All @@ -59,7 +59,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
Expand All @@ -82,7 +82,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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,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
Expand Down
8 changes: 4 additions & 4 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ cache:

build:
stage: build
image: golang:1.21
image: golang:1.23
script:
- go env
- go mod download
Expand All @@ -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
Expand Down
2 changes: 2 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6fbed51

Please sign in to comment.