Skip to content
This repository has been archived by the owner on Apr 22, 2024. It is now read-only.

Commit

Permalink
fix check
Browse files Browse the repository at this point in the history
Signed-off-by: huabing zhao <[email protected]>
  • Loading branch information
zhaohuabing committed Feb 26, 2024
1 parent 7d54ba2 commit fd56789
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ BUILD_OPTS ?=
TEST_OPTS ?=
TEST_PKGS ?= $(shell go list ./... | grep -v /e2e)
OUTDIR ?= bin
ENVTEST ?= sigs.k8s.io/controller-runtime/tools/setup-envtest
ENVTEST ?= sigs.k8s.io/controller-runtime/tools/setup-envtest@latest

include env.mk # Load common variables

Expand Down Expand Up @@ -90,11 +90,10 @@ test: ## Run all the tests

COVERAGE_OPTS ?=
.PHONY: coverage
coverage: ## Creates coverage report for all projects
coverage: setup-envtest ## Creates coverage report for all projects
@echo "Running test coverage"
@mkdir -p $(OUTDIR)/$@
@go get $(ENVTEST)
KUBEBUILDER_ASSETS="$(shell go run $(ENVTEST) use -p path)" \
KUBEBUILDER_ASSETS="$(shell setup-envtest use -p path)" \
go test $(COVERAGE_OPTS) \
--tags=integration \
-timeout 30s \
Expand All @@ -103,6 +102,10 @@ coverage: ## Creates coverage report for all projects
$(TEST_PKGS)
@go tool cover -html="$(OUTDIR)/$@/coverage.out" -o "$(OUTDIR)/$@/coverage.html"

.PHONY: setup-envtest
setup-envtest: ## Setup the envtest for the integration tests
@go install $(ENVTEST)

.PHONY: e2e
e2e: ## Runt he e2e tests
@$(MAKE) -C e2e e2e
Expand Down

0 comments on commit fd56789

Please sign in to comment.