-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
48 lines (37 loc) · 868 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
GO111MODULE = on
CGO_ENABLED = 0
GO_FILES = $(shell go list ./... | grep -v mocks)
.PHONY: test
test:
go test -v $(GO_FILES) -coverprofile=coverage.out
.PHONY: test-s
test-s:
go test -v $(pkg)
.PHONY: gen-mocks
gen-mocks:
go generate $(GO_FILES)
.PHONY: cleantestcache
cleantestcache:
go clean -testcache
.PHONY: tidy
tidy:
GO111MODULE=$(GO111MODULE) go mod tidy
.PHONY: cover
cover: cleantestcache test
go tool cover -html=coverage.out -o coverage.html
go tool cover -func coverage.out
.PHONY: cleanlintcache
cleanlintcache:
golangci-lint cache clean
.PHONY: lint
lint: cleanlintcache
golangci-lint run --timeout 20m ./...
.PHONY: dev-tools
dev-tools:
go install go.uber.org/mock/[email protected]
./scripts/install_goreleaser.sh
.PHONY: test-all
test-all: cover lint
.PHONY: dist-dev
dist-dev:
goreleaser build --snapshot --clean --single-target