-
-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathMakefile
51 lines (41 loc) · 1019 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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
## upgrade library
upgrade:
@go get -u -d ./...
.PHONY: upgrade
## Install library for development
devel-deps: deps
GO111MODULE=off go get github.com/Songmu/make2help/cmd/make2help
.PHONY: devel-deps
fmt:
@go fmt ./...
## Execute unit tests
test:
@go test -v -count=1 -timeout 300s -short ./...
.PHONY: test
## Execute race tests
test-race:
@go test -v -count=1 -timeout 300s -short -race ./...
.PHONY: test-race
## Execute integrated tests
test-integration:
@go test -v -count=1 -timeout 600s ./...
.PHONY: test-integration
## Output coverage of testing
cov:
@go test -count 1 -coverprofile=cover.out ./...
@go tool cover -html=cover.out
.PHONY: cov
## Install linter tool
install_linter:
go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.49.0
.PHONY: install_linter
## Lint
lint: install_linter
golangci-lint run --tests
.PHONY: lint
# Execute this command before you creates a pull request
pr-prep: fmt lint test-race test-integration
## Help
help:
@make2help --all
.PHONY: help