-
-
Notifications
You must be signed in to change notification settings - Fork 132
/
GNUmakefile
44 lines (34 loc) · 964 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
36
37
38
39
40
41
42
43
44
SWEEP ?= cloud
SWEEP_TIMEOUT ?= 360m
default: fmt lint install generate
.PHONY: build
build:
go build -v ./...
.PHONY: install
install: build
go install -v ./...
.PHONY: lint
lint:
golangci-lint run
.PHONY: generate
generate:
go generate ./...
.PHONY: fmt
fmt:
gofmt -s -w -e .
.PHONY: test
test:
go test ./... -v -cover -timeout=120s -parallel=10 $(TESTARGS)
.PHONY: testacc
testacc:
TF_ACC=1 go test ./... -v -cover -timeout 120m $(TESTARGS)
.PHONY: sweep
sweep:
# make sweep SWEEPARGS=-sweep-run=sentry_team
# set SWEEPARGS=-sweep-allow-failures to continue after first failure
@echo "WARNING: This will destroy infrastructure. Use only in development accounts."
go test ./... -v -sweep=$(SWEEP) $(SWEEPARGS) -timeout $(SWEEP_TIMEOUT)
.PHONY: sweeper
sweeper:
@echo "WARNING: This will destroy infrastructure. Use only in development accounts."
go test ./... -v -tags=sweep -sweep=$(SWEEP) -sweep-allow-failures -timeout $(SWEEP_TIMEOUT)