-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathMakefile
43 lines (31 loc) · 1.05 KB
/
Makefile
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
NAME=singlestoredb
BINARY=terraform-provider-${NAME}
COVERAGE=coverage.out
default: install
deps:
go mod tidy
build:
go build -o ${BINARY}
install: deps build
go install .
unit: install nocache # Unit tests depend on the binary.
go test -race -v -timeout=5m -short ./... -coverprofile=${COVERAGE} -covermode=atomic
integration: install nocache # Integration tests depend on the binary.
go test -race -v -timeout=2h -run Integration ./... -coverprofile=${COVERAGE} -covermode=atomic
nocache:
go clean -testcache
generate: tools
terraform fmt -recursive ./examples/
tfplugindocs
tools:
go install github.com/golangci/golangci-lint/cmd/[email protected]
go install github.com/hashicorp/terraform-plugin-docs/cmd/[email protected]
lint-fast: tools
golangci-lint run --fast ./...
lint: tools
golangci-lint run ./...
gencheck:
git diff --compact-summary --exit-code || \
(echo; echo "Unexpected difference in directories after code generation. Run 'make generate' command and commit."; exit 1)
tfplugindocs validate
./.validate_readme