-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
52 lines (35 loc) · 1.6 KB
/
Makefile
File metadata and controls
52 lines (35 loc) · 1.6 KB
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
52
DOCKER := $(shell which docker)
###############################################################################
### Tests
###############################################################################
test: test-memiavl test-versiondb test-store
test-store:
@go test -v -mod=readonly ./...;
test-memiavl:
@cd memiavl; go test -v -mod=readonly ./...;
test-versiondb:
@cd versiondb; go test -tags=rocksdb -v -mod=readonly ./...;
.PHONY: test test-memiavl test-store test-versiondb
###############################################################################
### Linting ###
###############################################################################
lint:
golangci-lint run --timeout=15m --tests=false
lint-fix:
golangci-lint run --fix --timeout=15m --tests=false
.PHONY: lint lint-fix
###############################################################################
### Protobuf ###
###############################################################################
protoVer=0.14.0
protoImageName=ghcr.io/cosmos/proto-builder:$(protoVer)
protoImage=$(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace $(protoImageName)
proto-all: proto-format proto-lint proto-gen
proto-gen:
@echo "Generating Protobuf files"
@$(protoImage) sh ./scripts/protocgen.sh
proto-format:
@$(protoImage) find ./ -name "*.proto" -exec buf format {} -w \;
proto-lint:
@$(protoImage) buf lint --error-format=json ./proto
.PHONY: proto-all proto-gen proto-format proto-lint