-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
29 lines (21 loc) · 907 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
#!make
default: help
# generate help info from comments: thanks to https://marmelab.com/blog/2016/02/29/auto-documented-makefile.html
help: ## help information about make commands
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
gen: ## runs go generate
go generate ./...
build: ## builds all
go build -o /dev/null ./...
test: ## runs the unit tests
go test -v -timeout 5m ./...
test-cover: ## outputs the unittest coverage statistics
go test -v -timeout 5m ./... -coverprofile coverage.out
go tool cover -func coverage.out
rm coverage.out
test-cover-report: ## an html report of the coverage statistics
go test -v ./... -covermode=count -coverpkg=./... -coverprofile coverage.out
go tool cover -html coverage.out -o coverage.html
rm coverage.out
lint: ## runs the linter
golangci-lint -v run ./...