forked from pagu-project/pagu
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
49 lines (37 loc) · 1.29 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
45
46
47
48
49
PACKAGES=$(shell go list ./... | grep -v 'tests')
### Testing
unit_test:
go test $(PACKAGES)
test:
go test ./... -covermode=atomic
race_test:
go test ./... --race
### dev tools
devtools:
@echo "Installing devtools"
go install golang.org/x/tools/cmd/goimports@latest
go install mvdan.cc/gofumpt@latest
go install github.com/golangci/golangci-lint/cmd/[email protected]
go install go.uber.org/mock/mockgen@latest
### mock
mock:
mockgen -source=./client/interface.go -destination=./client/mock.go -package=client
mockgen -source=./wallet/interface.go -destination=./wallet/mock.go -package=wallet
mockgen -source=./store/interface.go -destination=./store/mock.go -package=store
mockgen -source=./twitter_api/interface.go -destination=./twitter_api/mock.go -package=twitter_api
mockgen -source=./nowpayments/interface.go -destination=./nowpayments/mock.go -package=nowpayments
### Formatting, linting, and vetting
fmt:
gofumpt -l -w .
go mod tidy
check:
golangci-lint run --build-tags "${BUILD_TAG}" --timeout=20m0s
### building
build:
go build -o build/robopac-discord ./cmd/discord
go build -o build/robopac-cmd ./cmd/cmd
build-cmd:
go build -o build/robopac-cmd ./cmd/cmd
build-dc:
go build -o build/robopac-discord ./cmd/discord
.PHONY: build