-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
executable file
·48 lines (36 loc) · 870 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
export GOBIN := $(PWD)/bin
export PATH := $(GOBIN):$(PATH)
export GO111MODULE := on
./bin/minimock:
go install github.com/gojuno/minimock/v3/cmd/minimock
./bin/gowrap:
go install github.com/hexdigest/gowrap/cmd/gowrap
./bin/golangci-lint:
go install github.com/golangci/golangci-lint/cmd/golangci-lint
.PHONY:
tools: ./bin/minimock ./bin/golangci-lint
.PHONY:
generate: tools
go generate ./...
.PHONY:
lint: ./bin/golangci-lint
golangci-lint run --enable=goimports ./...
.PHONY:
test: lint
rm -f ./profile.cov
GOGC=off go test -race ./... -count 1 -v -coverprofile=profile.cov
.PHONY:
benchmark: lint
GOGC=off go test -bench=. ./... -benchtime=100x -v -count 1
.PHONY:
clean:
rm -f ./bin/*
rm -f ./profile.cov
rm -f ./execpool.test
./profile.cov: test
.PHONY:
show-coverage: profile.cov
go tool cover -html=profile.cov
.PHONY:
tidy:
go mod tidy