-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
36 lines (28 loc) · 804 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
GOPATH=$(shell go env GOPATH)
.PHONY: test
test:
go test `go list ./... | grep -v '/mocks'` -cover -count=1 -coverprofile=coverage.txt -covermode=count
.PHONY: deps
deps:
go mod tidy
go mod download
# linter:
GOLINT = $(GOPATH)/bin/golangci-lint
$(GOLINT):
curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(GOPATH)/bin v1.52.0
NILAWAY = $(GOPATH)/bin/nilaway
$(NILAWAY):
go install go.uber.org/nilaway/cmd/nilaway@latest
.PHONY: golint
golint: $(GOLINT)
$(GOLINT) run
.PHONY: nilaway
nilaway: $(NILAWAY)
$(NILAWAY) -include-pkgs="github.com/vtopc/go-monobank" -test=false ./...
.PHONY: lint
lint: golint nilaway
.PHONY: update-api
update-api: ## Upgrade deps
go get github.com/vtopc/go-rest
go get github.com/vtopc/epoch
@$(MAKE) deps