-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
61 lines (51 loc) · 1.73 KB
/
Makefile
File metadata and controls
61 lines (51 loc) · 1.73 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
53
54
55
56
57
58
59
60
61
.PHONY: test
test:
go test github.com/dipjyotimetia/event-shark/pkg/errors \
github.com/dipjyotimetia/event-shark/pkg/idempotency \
github.com/dipjyotimetia/event-shark/pkg/resilience \
github.com/dipjyotimetia/event-shark/pkg/serialization \
github.com/dipjyotimetia/event-shark/pkg/transformation \
github.com/dipjyotimetia/event-shark/pkg/config \
-v -count=1 --json > test-report.json
.PHONY: test-unit
test-unit:
go test ./pkg/... -v -count=1 -race
.PHONY: test-integration
test-integration:
go test ./tests/integration/... -v --tags=integration -count=1
.PHONY: build
build:
docker compose up -d
.PHONY: clean
clean:
docker compose down --rmi all --volumes
.PHONY: code-gen
code-gen:
go generate ./...
.PHONY: schema-gen
schema-gen:
go run script/avsc2json/main.go schema/avro/expense.avsc > docker/schema/expense.json
.PHONY: build-cli
build-cli:
go build -o bin/eventshark-cli ./cmd/cli
.PHONY: install-deps
install-deps:
go mod download
go mod tidy
.PHONY: run
run:
go run cmd/main.go
.PHONY: help
help:
@echo "EventShark Makefile Commands:"
@echo " make build - Start Docker services"
@echo " make clean - Stop and remove Docker services"
@echo " make test - Run all tests (unit tests only)"
@echo " make test-unit - Run unit tests with race detection"
@echo " make test-integration - Run integration tests (requires running server)"
@echo " make code-gen - Generate code from schemas"
@echo " make schema-gen - Generate JSON schemas"
@echo " make build-cli - Build CLI tool"
@echo " make install-deps - Install Go dependencies"
@echo " make run - Run EventShark server"
@echo " make help - Show this help message"