diff --git a/Makefile b/Makefile index 76f4654bae..1d31e7039b 100644 --- a/Makefile +++ b/Makefile @@ -73,10 +73,12 @@ endif .PHONY: lint lint: ## Run linter over the codebase + go install github.com/golangci/golangci-lint/cmd/golangci-lint golangci-lint run --timeout=30m .PHONY: test test: ## Lint, generate and run unit tests. Also ensure that integration tests compile + go install github.com/cloudflare/cfssl/cmd/...@latest $(MAKE) lint $(MAKE) unit-test $(MAKE) build-integration-test @@ -86,10 +88,12 @@ unit-test: check-all-generated-files-up-to-date unit-test-no-generate .PHONY: unit-test-no-generate ## Run unit test only unit-test-no-generate: + go install github.com/cloudflare/cfssl/cmd/...@latest CGO_ENABLED=0 go test -tags=release ./pkg/... ./cmd/... $(UNIT_TEST_ARGS) .PHONY: unit-test-race unit-test-race: ## Run unit test with race detection + go install github.com/cloudflare/cfssl/cmd/...@latest CGO_ENABLED=1 go test -race ./pkg/... ./cmd/... $(UNIT_TEST_ARGS) .PHONY: build-integration-test @@ -97,7 +101,7 @@ build-integration-test: $(all_generated_code) ## Ensure integration tests compil @# Compile integration test binary without running any. @# Required as build failure aren't listed when running go build below. See also: https://github.com/golang/go/issues/15513 go test -tags integration -run=^$$ ./integration/... - @# Build integration test binary: + @# Build integration test binary: go build -tags integration -o ./eksctl-integration-test ./integration/main.go .PHONY: integration-test @@ -177,7 +181,6 @@ $(generated_code_deep_copy_helper): $(deep_copy_helper_input) ## Generate Kuber $(generated_code_aws_sdk_mocks): $(call godeps,pkg/eks/mocks/mocks.go) ## Generate AWS SDK mocks AWS_SDK_GO_DIR=$(AWS_SDK_GO_DIR) go generate ./pkg/eks/mocks - .PHONY: generate-kube-reserved generate-kube-reserved: ## Update instance list with respective specs @cd ./pkg/nodebootstrap/ && go run reserved_generate.go @@ -195,4 +198,3 @@ prepare-release-candidate: ## Create release candidate .PHONY: print-version print-version: ## Prints the upcoming release number @go run pkg/version/generate/release_generate.go print-version -