From 0e99328f66b092cdb53cf251eac349eec96b9436 Mon Sep 17 00:00:00 2001 From: Leo Antoli <430982+lantoli@users.noreply.github.com> Date: Mon, 11 Mar 2024 12:10:31 +0100 Subject: [PATCH] chore: Simplifies makefile (#2003) * simplify makefile --- GNUmakefile | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/GNUmakefile b/GNUmakefile index 4ab2c28413..3ee600efca 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -1,14 +1,10 @@ -TEST?=$$(go list ./...) ACCTEST_TIMEOUT?=300m PARALLEL_GO_TEST?=20 -GOFMT_FILES?=$$(find . -name '*.go' |grep -v vendor) BINARY_NAME=terraform-provider-mongodbatlas DESTINATION=./bin/$(BINARY_NAME) GOFLAGS=-mod=vendor -GOOPTS="-p 2" - GITTAG=$(shell git describe --always --tags) VERSION=$(GITTAG:v%=%) LINKER_FLAGS=-s -w -X 'github.com/mongodb/terraform-provider-mongodbatlas/version.ProviderVersion=${VERSION}' @@ -35,17 +31,17 @@ install: fmtcheck .PHONY: test test: fmtcheck - go test $(TEST) -timeout=30s -parallel=4 -race -covermode=atomic -coverprofile=coverage.out + go test ./... -timeout=30s -parallel=4 -race .PHONY: testacc testacc: fmtcheck @$(eval VERSION=acc) - TF_ACC=1 go test $(TEST) -run '$(TEST_REGEX)' -v -parallel '$(PARALLEL_GO_TEST)' $(TESTARGS) -timeout $(ACCTEST_TIMEOUT) -cover -ldflags="$(LINKER_FLAGS)" + TF_ACC=1 go test ./... -run '$(TEST_REGEX)' -v -parallel '$(PARALLEL_GO_TEST)' $(TESTARGS) -timeout $(ACCTEST_TIMEOUT) -ldflags="$(LINKER_FLAGS)" .PHONY: testaccgov testaccgov: fmtcheck @$(eval VERSION=acc) - TF_ACC=1 go test $(TEST) -run 'TestAccProjectRSGovProject_CreateWithProjectOwner' -v -parallel 1 "$(TESTARGS) -timeout $(ACCTEST_TIMEOUT) -cover -ldflags=$(LINKER_FLAGS) " + TF_ACC=1 go test ./... -run 'TestAccProjectRSGovProject_CreateWithProjectOwner' -v -parallel 1 "$(TESTARGS) -timeout $(ACCTEST_TIMEOUT) -ldflags=$(LINKER_FLAGS) " .PHONY: fmt fmt: @@ -81,13 +77,6 @@ tools: ## Install dev tools go install github.com/hashicorp/terraform-plugin-codegen-framework/cmd/tfplugingen-framework@latest curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(shell go env GOPATH)/bin $(GOLANGCI_VERSION) -.PHONY: check -check: test lint - -.PHONY: test-compile -test-compile: - go test -c $(TEST) $(TESTARGS) - .PHONY: website-lint website-lint: @echo "==> Checking website against linters..." @@ -137,4 +126,3 @@ scaffold-schemas: .PHONY: generate-doc generate-doc: ## Generate the resource documentation via tfplugindocs ./scripts/generate-doc.sh ${resource_name} -