-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
33 lines (23 loc) · 871 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
TEST_FLAGS ?= -p 8 -failfast -race -shuffle on
all:
@echo "make <cmd>:"
@echo ""
@echo "commands:"
@awk -F'[ :]' '/^#+/ {comment=$$0; gsub(/^#+[ ]*/, "", comment)} !/^(_|all:)/ && /^([A-Za-z_-]+):/ && !seen[$$1]++ {printf " %-24s %s\n", $$1, (comment ? "- " comment : ""); comment=""} !/^#+/ {comment=""}' Makefile
test-clean:
go clean -testcache
test: test-clean
go test -run=$(TEST) $(TEST_FLAGS) -json ./... | tparse --all --follow
test-rerun: test-clean
go run github.com/goware/rerun/cmd/rerun -watch ./ -run 'make test'
test-coverage:
go test -run=$(TEST) $(TEST_FLAGS) -cover -coverprofile=coverage.out -json ./... | tparse --all --follow
test-coverage-inspect: test-coverage
go tool cover -html=coverage.out
generate:
go generate -x ./...
.PHONY: proto
proto:
go generate -x ./proto/...
lint:
golangci-lint run ./... --fix -c .golangci.yml