-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
51 lines (38 loc) · 854 Bytes
/
Copy pathMakefile
File metadata and controls
51 lines (38 loc) · 854 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
BINARY=poold
PKG=github.com/glnro/txpool
PROTO_DIR=proto
GEN_DIR=pkg/types
all: build
.PHONY: proto build run docker up down test test-e2e lint clean
proto:
protoc \
--proto_path=$(PROTO_DIR) \
--go_out=$(GEN_DIR) \
--go-grpc_out=$(GEN_DIR) \
$(PROTO_DIR)/txpool/message.proto \
$(PROTO_DIR)/txpool/service.proto
build:
go build -o bin/$(BINARY) ./cmd/$(BINARY)
run:
go run ./cmd/$(BINARY)
docker:
docker build -t txpool-node .
up:
docker compose up --build -d
down:
docker compose down
# Unit tests only (no e2e)
test:
go test -v ./... -tags=unit
test-e2e: up
sleep 5
go test -v ./test/e2e -tags=e2e || (make down && exit 1)
make down
lint:
golangci-lint run ./... \
--config .golangci.yaml \
--timeout 2m \
lint-fix:
golangci-lint run --fix --config .golangci.yaml
clean:
rm -rf bin/ $(GEN_DIR)/*.pb.go