File tree Expand file tree Collapse file tree 2 files changed +25
-1
lines changed Expand file tree Collapse file tree 2 files changed +25
-1
lines changed Original file line number Diff line number Diff line change 4747 uses : golang/govulncheck-action@v1
4848 with :
4949 go-version-file : tests/e2e/go.mod
50+ gomod-dotzero-check :
51+ runs-on : ubuntu-latest
52+ steps :
53+ - name : " Checkout Repository"
54+ uses : actions/checkout@v4
55+ with :
56+ show-progress : false
57+ - name : " tests/e2e/go.mod must use Go version major.minor.0"
58+ env :
59+ GO_MOD_FILE : go.mod
60+ run : |
61+ test $(grep "^go " $GO_MOD_FILE | awk '{print $2}' | cut -d. -f3) != 0 && exit 1
62+ - name : " tests/e2e/go.mod must use Go version major.minor.0"
63+ env :
64+ GO_MOD_FILE : tests/e2e/go.mod
65+ run : |
66+ test $(grep "^go " $GO_MOD_FILE | awk '{print $2}' | cut -d. -f3) != 0 && exit 1
Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ SHELL := /bin/bash
1818GOOS ?= $(shell go env GOOS)
1919GOARCH ?= $(shell go env GOARCH)
2020GOPROXY ?= $(shell go env GOPROXY)
21+ GO_DIRECTIVE_VERSION ?= 1.24.0
2122GIT_VERSION ?= $(shell git describe --dirty --tags --match='v* ')
2223VERSION ?= $(GIT_VERSION )
2324IMAGE_REPOSITORY ?= provider-aws/cloud-controller-manager
@@ -120,7 +121,7 @@ e2e.test:
120121 mv tests/e2e/e2e.test e2e.test
121122
122123.PHONY : check
123- check : verify-fmt verify-lint vet
124+ check : verify-fmt verify-lint vet verify-go-directive
124125
125126.PHONY : develop
126127develop : aws-cloud-controller-manager test update-fmt check
@@ -142,6 +143,12 @@ verify-lint:
142143verify-codegen :
143144 ./hack/verify-codegen.sh
144145
146+ .PHONY : verify-go-directive
147+ verify-go-directive :
148+ # use the core Cluster API script directly to verify the go directive matches the desired one.
149+ # ref: https://github.com/kubernetes-sigs/cluster-api/blob/v1.10.7/hack/verify-go-directive.sh
150+ curl --retry $(CURL_RETRIES ) -fsL https://raw.githubusercontent.com/kubernetes-sigs/cluster-api/refs/tags/v1.11.0/hack/verify-go-directive.sh | bash -s -- -g $(GOLANG_DIRECTIVE_VERSION )
151+
145152.PHONY : vet
146153vet :
147154 go vet ./...
You can’t perform that action at this time.
0 commit comments