forked from hashicorp/terraform-provider-googleworkspace
-
Notifications
You must be signed in to change notification settings - Fork 0
/
GNUmakefile
35 lines (26 loc) · 825 Bytes
/
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
SWEEP?=us-central1
TEST?=$$(go list ./...)
default: build
build: fmtcheck
go install
fmt:
@echo "==> Fixing source code with gofmt..."
gofmt -w -s ./internal/provider
# Currently required by tf-deploy compile
fmtcheck:
@echo "==> Checking source code against gofmt..."
@sh -c "'$(CURDIR)/scripts/gofmtcheck.sh'"
generate: build
go generate ./...
lint:
@echo "==> Checking source code against linters..."
@golangci-lint run ./internal/provider
sweep:
@echo "WARNING: This will destroy infrastructure. Use only in development accounts."
go test ./internal/provider -v -sweep=$(SWEEP) -sweep-run=$(SWEEPARGS) -timeout 60m
test: fmtcheck
go test -count=1 $(TESTARGS) -timeout=30s $(TEST)
# Run acceptance tests
.PHONY: testacc
testacc: fmtcheck
TF_ACC=1 go test -count=1 $(TEST) -v $(TESTARGS) -timeout 120m