forked from geniesinc/flow-go-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
33 lines (26 loc) · 846 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
# Ensure go bin path is in path (especially for CI)
PATH := $(PATH):$(GOPATH)/bin
.PHONY: test
test:
GO111MODULE=on go test -coverprofile=coverage.txt ./...
.PHONY: coverage
coverage: test
go tool cover -html=coverage.txt
.PHONY: generate
generate:
go get -d github.com/vektra/mockery/cmd/mockery
go generate ./...
.PHONY: ci
ci: check-tidy test coverage
# Ensure there is no unused dependency being added by accident and all generated code is committed
.PHONY: check-tidy
check-tidy: generate
go mod tidy
git diff --exit-code
.PHONY: check-headers
check-headers:
@./check-headers.sh
.PHONY: generate-openapi
generate-openapi:
swagger-codegen generate -l go -i https://raw.githubusercontent.com/onflow/flow/master/openapi/access.yaml -D packageName=models,modelDocs=false,models -o access/http/models;
go fmt ./access/http/models