-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
36 lines (24 loc) · 911 Bytes
/
Makefile
File metadata and controls
36 lines (24 loc) · 911 Bytes
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
GOLINT := golangci-lint
PACKAGES_FOR_TEST := $(shell go list ./... | grep -v config | grep -v bin | grep -v interfaces | grep -v model | grep -v utils)
all: gen-mock dep dep-update fmt lint test
dep:
go mod tidy
go mod download
dep-update:
go get -t -u ./...
fmt:
go fmt github.com/OrbisSystems/orbis-sdk-go/...
lint: dep check-lint
$(GOLINT) run --timeout=5m -c .golangci.yml
test: gen-mock
@go test -tags=unit -cover -race -count=1 -timeout=60s $(PACKAGES_FOR_TEST)
check-lint:
@which $(GOLINT) || curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.51.1
dc-up:
docker-compose up -d
dc-down:
docker-compose down
gen-mock: check-mockgen
mockgen -package mock -source interfaces/interface.go -destination interfaces/mock/interface.go
check-mockgen:
@which mockgen || go install github.com/golang/mock/mockgen@v1.6.0