-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
38 lines (26 loc) · 929 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
ci: lint cover benchmark
.PHONY: ci
#################################################
# Bootstrapping for base golang package and tool deps
#################################################
vendor: go.sum
GO111MODULE=on go mod vendor
mod-update:
GO111MODULE=on go get -u -m
GO111MODULE=on go mod tidy
mod-tidy:
GO111MODULE=on go mod tidy
.PHONY: $(CMD_PKGS)
.PHONY: mod-update mod-tidy
#################################################
# Test and linting
#################################################
test: vendor
@$(TEST_ENV) CGO_ENABLED=0 go test $$(go list ./... | grep -v generated)
lint:
GO111MODULE=on go run github.com/golangci/golangci-lint/cmd/golangci-lint run ./...
benchmark: vendor
@CGO_ENABLED=0 go test -v -run=XXX -bench=.
cover: vendor
@CGO_ENABLED=0 go test -v -coverprofile=coverage.txt -covermode=atomic $$(go list ./... | grep -v vendor)
.PHONY: $(LINTERS) test cover benchmark