-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
34 lines (20 loc) · 821 Bytes
/
Makefile
File metadata and controls
34 lines (20 loc) · 821 Bytes
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
.PHONE:help
help: ## Display this help screen
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
.PHONY:dev-setup
dev-setup: ## Initialise this machine with development dependencies
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.49.0
.PHONY:static-check
static-check: ## Run static code checks
golangci-lint run
.PHONY: test-unit
test-unit:
go test -race ./...
.PHONY: test
test: static-check ## Run all tests without any cache
go test -race ./... -count=1 -coverprofile coverage.out
go tool cover -func coverage.out | grep total:
.PHONY: show-cover
show-cover:
go tool cover -html=coverage.out -o coverage.html
xdg-open coverage.html