Skip to content

Commit

Permalink
Bump to Go 1.24 (#273)
Browse files Browse the repository at this point in the history
Signed-off-by: Ignasi Barrera <[email protected]>
  • Loading branch information
nacx authored Feb 14, 2025
1 parent 7ca3eee commit 7323404
Show file tree
Hide file tree
Showing 7 changed files with 1,033 additions and 266 deletions.
10 changes: 5 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -100,15 +100,15 @@ config/lint: ## Lint the Config Proto generated code

.PHONY: test
test: ## Run all the tests
@KUBEBUILDER_ASSETS="$(shell go run $(ENVTEST) use -p path)" \
@KUBEBUILDER_ASSETS="$(shell go tool setup-envtest use -p path)" \
go test $(TEST_OPTS) $(TEST_PKGS)

COVERAGE_OPTS ?=
.PHONY: coverage
coverage: ## Creates coverage report for all projects
@echo "Running test coverage"
@mkdir -p $(OUTDIR)/$@
@KUBEBUILDER_ASSETS="$(shell go run $(ENVTEST) use -p path)" \
@KUBEBUILDER_ASSETS="$(shell go tool setup-envtest use -p path)" \
go test $(COVERAGE_OPTS) \
-timeout 30s \
-coverprofile $(OUTDIR)/$@/coverage.out \
Expand Down Expand Up @@ -198,13 +198,13 @@ GOLANGCI_LINT_CONFIG ?= .golangci.yml
.PHONY: lint
lint: $(GOLANGCI_LINT_CONFIG) config/lint ## Lint checks for all Go code
@echo "Linting Go code"
@go run $(GOLANGCI_LINT) run $(LINT_OPTS) --build-tags "$(TEST_TAGS)" --config $(GOLANGCI_LINT_CONFIG)
@go tool golangci-lint run $(LINT_OPTS) --build-tags "$(TEST_TAGS)" --config $(GOLANGCI_LINT_CONFIG)

.PHONY: format
format: go.mod ## Format all Go code
@echo "Formatting code"
@@go run $(SWEYES) header fix
@go run $(GOSIMPORTS) -local $(GO_MODULE) -w .
@go tool license-eye header fix
@go tool gosimports -local $(GO_MODULE) -w .
@gofmt -w .

.PHONY: check
Expand Down
6 changes: 3 additions & 3 deletions e2e/suite-k8s.mk
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ e2e-post:: ## Destroy the kind cluster and the generated kubeconfig file
ifeq ($(E2E_PRESERVE_LOGS),true)
@$(MAKE) capture-logs
endif
@go run $(KIND) delete cluster -n $(E2E_CLUSTER_NAME)
@go tool kind delete cluster -n $(E2E_CLUSTER_NAME)
@rm -f $(E2E_KUBECONFIG)

.PHONY: e2e-post-error
Expand All @@ -60,15 +60,15 @@ capture-logs:
# If the kubeconfig file does not exist, create a new cluster and export the kubeconfig file to the
# configured file
$(E2E_KUBECONFIG): $(E2E_KIND_CONFIG)
@go run $(KIND) create cluster -n $(E2E_CLUSTER_NAME) --kubeconfig $(@) --config $(E2E_KIND_CONFIG)
@go tool kind create cluster -n $(E2E_CLUSTER_NAME) --kubeconfig $(@) --config $(E2E_KIND_CONFIG)

# Load the e2e images in the kind cluster. Note images are tagged in the `kind-local` registry
# to use it as a placeholder in e2e kubernetes manifests regardless of the configured $(DOCKER_HUB). This
# also helps state that the images needs to be kind-loaded.
.PHONY: kind-load
kind-load: ## Load the end-to-end test images in the local Kind cluster
@docker tag $(E2E_IMAGE) kind-local/$(NAME):e2e
@go run $(KIND) load docker-image kind-local/$(NAME):e2e -n $(E2E_CLUSTER_NAME)
@go tool kind load docker-image kind-local/$(NAME):e2e -n $(E2E_CLUSTER_NAME)

.PHONY: kind-create
kind-create: e2e-pre
Expand Down
6 changes: 0 additions & 6 deletions env.mk
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,6 @@ NAME ?= authservice

-include $(ROOT)/.makerc # Pick up any local overrides.

GOLANGCI_LINT ?= github.com/golangci/golangci-lint/cmd/[email protected]
GOSIMPORTS ?= github.com/rinchsan/gosimports/cmd/[email protected]
SWEYES ?= github.com/apache/skywalking-eyes/cmd/[email protected]
KIND ?= sigs.k8s.io/[email protected]
ENVTEST ?= sigs.k8s.io/controller-runtime/tools/setup-envtest@latest

TARGETS ?= linux-amd64 linux-arm64 #darwin-amd64 darwin-arm64
FIPS_TARGETS := $(filter linux-%,$(TARGETS))

Expand Down
Loading

0 comments on commit 7323404

Please sign in to comment.