-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
47 lines (36 loc) · 1.05 KB
/
Makefile
File metadata and controls
47 lines (36 loc) · 1.05 KB
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
45
46
47
.DEFAULT_GOAL := help
.PHONY: lint fmt test test-integration clean tidy vuln modernize-check audit test/cover help
## lint: run golangci-lint
lint:
golangci-lint run --new-from-rev="origin/master" ./...
## fmt: format code
fmt:
golangci-lint fmt ./...
## test: run tests with race detector
test:
go test -race -shuffle=on -coverprofile=coverage.out -covermode=atomic ./...
## test-integration: run integration tests
test-integration:
go test -race -tags=integration -timeout=600s -v ./integration/...
## clean: remove build artifacts
clean:
rm -f coverage.out
## tidy: tidy go modules
tidy:
go mod tidy
## vuln: run govulncheck
vuln:
go tool govulncheck ./...
## modernize-check: preview Go modernizations without changing files
modernize-check:
go fix -n ./...
## audit: run all checks
audit: lint test vuln modernize-check
go mod tidy -diff
go mod verify
## test/cover: open HTML coverage report
test/cover: test
go tool cover -html=coverage.out
## help: show this help
help:
@sed -n 's/^##//p' ${MAKEFILE_LIST} | column -t -s ':' | sed -e 's/^/ /'