-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
42 lines (30 loc) · 935 Bytes
/
Copy pathMakefile
File metadata and controls
42 lines (30 loc) · 935 Bytes
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
.PHONY: docs build test test-v test-integration cover cover-check lint fmt vet tidy install-tools
build:
go build ./...
test:
go test -race ./...
test-v:
go test -race -v ./...
test-integration:
go test -tags=integration -race -count=1 -run TestLive ./integration/...
cover:
go test -race -coverprofile=coverage.out ./...
go tool cover -html=coverage.out -o coverage.html
cover-check:
go test -race -coverprofile=coverage.out ./...
@go tool cover -func=coverage.out | grep total | awk '{print $$3}' | \
awk -F. '{if ($$1 < 70) {print "Coverage " $$0 " is below 70%"; exit 1}}'
lint:
golangci-lint run ./...
fmt:
gofmt -w .
goimports -w -local github.com/Edge-Center/edgecenteredgemon-go .
vet:
go vet ./...
tidy:
go mod tidy
install-tools:
go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
go install golang.org/x/tools/cmd/goimports@latest
docs:
go list ./... | xargs -n1 go doc -all