-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
34 lines (24 loc) · 1.01 KB
/
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
help: ## show this help
@grep -e "^[0-9a-zA-Z_-]*:.*##" $(MAKEFILE_LIST) | \
sed 's/^\(.*\):.*##\(.*\)/\1\t\2/'
tidy: ## update deps
go mod tidy
build: ## build
go build $(shell go list ./... | grep -v /example)
lint: ## lint
go vet ./...
clean: ## clean
-rm store.test
go clean -cache
test: clean ## test
go test -v -timeout=10s $(shell go list ./... | grep -v /example)
bench: clean ## test bench
# -benchtime sets the minimum amount of time that the benchmark function will run
# -run=^# filter out all of the unit test functions.
go test -v -bench=. -benchtime=10s $(shell go list ./... | grep -v /example)
bench-mem: clean ## test bench with memory usage
# -run=^# filter out all of the unit test functions.
go test -v -bench=. -benchtime=10s -benchmem $(shell go list ./... | grep -v /example)
coverage: ## test with coverage
#go test --converage ./store/...
go test -coverprofile=coverage.txt -covermode=atomic -v -count=1 -timeout=30s -parallel=4 -failfast $(shell go list ./... | grep -v /example)