Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: build and test with Go 1.23 #741

Merged
merged 1 commit into from
Oct 7, 2024
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
5 changes: 4 additions & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,17 @@ on:
branches: [main]
pull_request:

env:
GOTOOLCHAIN: local

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
go-version: "1.23"

- uses: golangci/golangci-lint-action@v6
with:
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/publish_on_master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ on:
push:
branches:
- main

env:
GOTOOLCHAIN: local

jobs:
publish:
runs-on: ubuntu-latest
Expand All @@ -14,7 +18,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
go-version: "1.23"

- name: Set up QEMU
uses: docker/setup-qemu-action@v3
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/publish_on_tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ on:
push:
tags:
- "v*.*.*"

env:
GOTOOLCHAIN: local

jobs:
publish:
runs-on: ubuntu-latest
Expand All @@ -14,7 +18,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
go-version: "1.23"

- name: Set up QEMU
uses: docker/setup-qemu-action@v3
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ on:
branches: [main]
pull_request:

env:
GOTOOLCHAIN: local

jobs:
test:
runs-on: ubuntu-latest
Expand All @@ -13,7 +16,7 @@ jobs:

- uses: actions/setup-go@v5
with:
go-version-file: go.mod
go-version: "1.23"

- name: Run tests
run: go test -v -tags integration -race -coverprofile=coverage.txt ./...
Expand Down Expand Up @@ -50,7 +53,6 @@ jobs:
- k3s: v1.31
k8s-test: v1.30.1


env:
K3S_CHANNEL: ${{ matrix.k3s }}
K8S_TEST_VERSION: ${{ matrix.k8s-test }}
Expand All @@ -61,7 +63,7 @@ jobs:

- uses: actions/setup-go@v5
with:
go-version-file: go.mod
go-version: "1.23"

- uses: opentofu/setup-opentofu@v1
with:
Expand Down
4 changes: 2 additions & 2 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.22
image: golang:1.23
script:
- go env
- go mod download
Expand All @@ -31,7 +31,7 @@ test:lint:

test:unit:
stage: test
image: golang:1.22
image: golang:1.23
script:
- go test -v -coverprofile=coverage.txt -covermode count ./...
- go get github.com/boumenot/gocover-cobertura
Expand Down
2 changes: 1 addition & 1 deletion deploy/docker-swarm/pkg/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM --platform=$TARGETPLATFORM golang:1.22 as builder
FROM --platform=$TARGETPLATFORM golang:1.23 as builder

WORKDIR /build

Expand Down
2 changes: 1 addition & 1 deletion dev/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.22 as builder
FROM golang:1.23 as builder

WORKDIR /build

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module github.com/hetznercloud/csi-driver

go 1.22.0

toolchain go1.22.6
toolchain go1.23.2

require (
github.com/container-storage-interface/spec v1.10.0
Expand Down