-
Notifications
You must be signed in to change notification settings - Fork 6
/
Makefile
50 lines (38 loc) · 945 Bytes
/
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
44
45
46
47
48
49
50
######################################################
#
# Development targets
#
######################################################
.PHONY: download
download:
@go mod download
.PHONY: install-tools
install-tools: download
@go list -f '{{range .Imports}}{{.}} {{end}}' tools.go | xargs go install
.PHONY: generate
generate: buf-generate go-generate
.PHONY: go-generate
go-generate: install-tools
@go generate ./...
.PHONY: buf-generate
buf-generate: install-tools
@buf generate
.PHONY: test
test: generate
@go test -v -race ./...
.PHONY: test-short
test-short: generate
@go test -v -race -short ./...
.PHONY: test-coverage
test-coverage: generate
@go test -v -race -coverprofile=coverage.out ./...
.PHONY: check
check: check-vet check-lint
.PHONY: check-vet
check-vet:
@go vet ./...
.PHONY: check-lint
check-lint:
@staticcheck ./...
ci-test-coverage:
@go test -v -race -coverprofile=coverage.txt -covermode=atomic ./...