Skip to content

Commit

Permalink
Bump Golang version to 1.22.0 (#333)
Browse files Browse the repository at this point in the history
* Bump Golang version to 1.22.0

* Bump controller-gen and kustomize version

* Add instruction to set Go version via go.mod
  • Loading branch information
friedrichwilken authored Feb 19, 2024
1 parent 309ab88 commit b9e46e6
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 25 deletions.
29 changes: 15 additions & 14 deletions .github/workflows/pull-e2e-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ env:

on:
pull_request:
branches: [ "main" ]
branches: ["main"]
paths-ignore:
- 'docs/**'
- '**.md'
- 'sec-scanners-config.yaml'
- "docs/**"
- "**.md"
- "sec-scanners-config.yaml"

jobs:
e2e:
Expand All @@ -24,9 +24,11 @@ jobs:
- name: Cache Go dependencies
uses: actions/setup-go@v5
with:
go-version-file: './go.mod'
go-version-file: "./go.mod"
check-latest: true
cache-dependency-path: './go.sum'
cache-dependency-path: "./go.sum"

- run: go version

- name: Install k3d tools
run: |
Expand Down Expand Up @@ -82,36 +84,35 @@ jobs:
run: |
make e2e-cleanup
# the following steps only run on failure to help finding the cause of the failure
# the following steps only run on failure to help finding the cause of the failure

- name: List CRDs
if: failure()
if: failure()
run: |
kubectl get crd
- name: List Namespaces
if: failure()
if: failure()
run: |
kubectl get namespaces
- name: List StatefulSets
if: failure()
if: failure()
run: |
kubectl get sts --all-namespaces
- name: List Pods
if: failure()
if: failure()
run: |
kubectl get po --all-namespaces
- name: List PVCs
if: failure()
if: failure()
run: |
kubectl get pvc --all-namespaces
- name: List NATS CR
if: failure()
if: failure()
run: |
kubectl get nats --all-namespaces
Expand Down
17 changes: 13 additions & 4 deletions .github/workflows/pull-e2e-upgrade-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ env:

on:
pull_request:
branches: [ "main" ]
branches: ["main"]
paths-ignore:
- 'docs/**'
- '**.md'
- 'sec-scanners-config.yaml'
- "docs/**"
- "**.md"
- "sec-scanners-config.yaml"

jobs:
e2e-upgrade: # This job tests the upgrade of NATS module from latest image of the main branch to the current commit.
Expand All @@ -21,6 +21,15 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Cache Go dependencies
uses: actions/setup-go@v5
with:
go-version-file: "./go.mod"
check-latest: true
cache-dependency-path: "./go.sum"

- run: go version

- name: Install k3d tools
run: |
make -C hack/ci/ install-k3d-tools
Expand Down
17 changes: 13 additions & 4 deletions .github/workflows/push-e2e-upgrade-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ env:

on:
push:
branches: [ "main" ]
branches: ["main"]
paths-ignore:
- 'docs/**'
- '**.md'
- 'sec-scanners-config.yaml'
- "docs/**"
- "**.md"
- "sec-scanners-config.yaml"

jobs:
e2e-upgrade: # This job tests the upgrade of NATS module from latest release from fast channel to current commit.
Expand All @@ -21,6 +21,15 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Cache Go dependencies
uses: actions/setup-go@v5
with:
go-version-file: "./go.mod"
check-latest: true
cache-dependency-path: "./go.sum"

- run: go version

- name: Install k3d tools
run: |
make -C hack/ci/ install-k3d-tools
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,8 @@ CONTROLLER_GEN ?= $(LOCALBIN)/controller-gen
ENVTEST ?= $(LOCALBIN)/setup-envtest

## Tool Versions
KUSTOMIZE_VERSION ?= v4.5.7
CONTROLLER_TOOLS_VERSION ?= v0.11.1
KUSTOMIZE_VERSION ?= v5.3.0
CONTROLLER_TOOLS_VERSION ?= v0.14.0

KUSTOMIZE_INSTALL_SCRIPT ?= "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh"
.PHONY: kustomize
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/kyma-project/nats-manager

go 1.21
go 1.22.0

require (
dario.cat/mergo v1.0.0
Expand Down

0 comments on commit b9e46e6

Please sign in to comment.