generated from hashicorp/terraform-provider-scaffolding
-
Notifications
You must be signed in to change notification settings - Fork 9
/
GNUmakefile
42 lines (32 loc) · 1.08 KB
/
GNUmakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
default: build
generate: fmt
@echo "Generating documentations ..."
go generate ./...
build: generate lint
@echo "Building source code ..."
mkdir -p ./bin
go build -o ./bin/terraform-provider-hopsworksai
fmt:
@echo "Formatting source code using gofmt"
find . -name '*.go' | grep -v vendor | xargs gofmt -s -w
terraform fmt -recursive examples
terraform fmt -recursive test-fixtures
lint:
@echo "Linting source code using golangci-ling"
golangci-lint run ./...
test:
@echo "Running unit tests ..."
go test ./... -v -race -coverprofile=coverage.txt -covermode=atomic $(TESTARGS) -parallel=4
coverage: test
@echo "Running code coverage ..."
go tool cover -html coverage.txt
testacc:
@echo "Running acceptance tests ..."
./test-fixtures/run-acceptance-tests.sh
sweep:
@echo "WARNING: This will destroy infrastructure. Use only in development accounts."
go test ./hopsworksai -v -sweep="all" $(SWEEPARGS) -timeout 60m
cleanupacc:
@echo "Cleanup acceptance test resources"
./test-fixtures/cleanup-acceptance-tests.sh
.PHONY: build testacc generate test fmt lint sweep coverage