forked from yandex/pandora
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
47 lines (35 loc) · 1003 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
.PHONY: all test lint vet fmt travis coverage checkfmt prepare deps
NO_COLOR=\033[0m
OK_COLOR=\033[32;01m
ERROR_COLOR=\033[31;01m
WARN_COLOR=\033[33;01m
all: test vet checkfmt
travis: test checkfmt coverage
prepare: fmt test vet
test:
@echo "$(OK_COLOR)Test packages$(NO_COLOR)"
go test -race -v ./...
coverage:
@echo "$(OK_COLOR)Make coverage report$(NO_COLOR)"
@./script/coverage.sh
-goveralls -coverprofile=gover.coverprofile -service=travis-ci
vet:
@echo "$(OK_COLOR)Run vet$(NO_COLOR)"
@go vet ./...
checkfmt:
@echo "$(OK_COLOR)Check formats$(NO_COLOR)"
@./script/checkfmt.sh .
fmt:
@echo "$(OK_COLOR)Check fmt$(NO_COLOR)"
@echo "FIXME go fmt does not format imports, should be fixed"
@go fmt
tools:
@echo "$(OK_COLOR)Install tools$(NO_COLOR)"
go install golang.org/x/tools/cmd/goimports@latest
go get golang.org/x/tools/cmd/cover
go get github.com/modocache/gover
go get github.com/mattn/goveralls
deps:
$(info #Install dependencies...)
go mod tidy
go mod download