-
Notifications
You must be signed in to change notification settings - Fork 11
/
Makefile
44 lines (38 loc) · 1.15 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
35
36
37
38
39
40
41
42
43
44
# ==================================================================================== #
# HELPERS
# ==================================================================================== #
## help: print this help message
.PHONY: help
help:
@echo 'Usage:'
@sed -n 's/^##//p' ${MAKEFILE_LIST} | column -t -s ':' | sed -e 's/^/ /'
# ==================================================================================== #
# QUALITY CONTROL
# ==================================================================================== #
## test: run all tests
.PHONY: test
test:
@echo 'Removing test cache...'
go clean -testcache
@echo 'Running tests...'
go test -race -vet=off -timeout 15s ./...
## bench: run all benchmarks
.PHONY: bench
bench:
@echo 'Running benchmarks...'
go test -bench=.
## audit: tidy and vendor dependencies and format, vet and test all code
.PHONY: audit
audit: tidy
@echo 'Formatting code...'
go fmt ./...
@echo 'Linting code...'
golangci-lint run
@echo 'Running tests...'
go test -race -vet=off ./...
## tidy: tidy and verify dependencies
.PHONY: tidy
vendor:
@echo 'Tidying and verifying module dependencies...'
go mod tidy
go mod verify