-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
75 lines (51 loc) Β· 3.13 KB
/
Makefile
File metadata and controls
75 lines (51 loc) Β· 3.13 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
# CatCoding Development Makefile
# Standard CI/CD commands β run `make help` to see all targets
# ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
.PHONY: help lint test build check all ci clean
help: ## Show this help
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | \
awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}'
# ββ Lint βββββββββββββββββββββββββββββββββββββββββββββββββββββ
lint: lint-rust lint-python lint-dashboard ## Run all linters
lint-rust: ## Lint Rust code (fmt + clippy)
cargo fmt --all -- --check
cargo clippy --all-features -- -A dead-code -A unused-imports -A unused-variables -A unused-must-use
lint-python: ## Lint Python agents (ruff)
ruff check agents/
ruff format agents/ --check
lint-dashboard: ## Lint dashboard (TypeScript)
cd dashboard && npx vue-tsc --noEmit
# ββ Test βββββββββββββββββββββββββββββββββββββββββββββββββββββ
test: test-rust test-python ## Run all tests
test-rust: ## Run Rust tests
cargo test --all-features --verbose
test-python: ## Run Python tests
pytest tests/python/ -v --tb=short
test-integration: ## Run integration test (needs NATS)
nats-server -js &
sleep 2
cargo build --release -p catcoding-daemon
./target/release/catcoding-daemon &
sleep 3
curl -sf http://localhost:9800/health && echo "β
OK" || echo "β FAIL"
@pkill catcoding-daemon 2>/dev/null; pkill nats-server 2>/dev/null
# ββ Build ββββββββββββββββββββββββββββββββββββββββββββββββββββ
build: build-rust build-dashboard ## Build everything
build-rust: ## Build Rust binaries (release)
cargo build --release
build-dashboard: ## Build dashboard
cd dashboard && npm ci && npm run build
# ββ Full check (mirrors CI pipeline locally) βββββββββββββββββ
check: lint test build ## Run full CI pipeline locally
# ββ CI (alias for check) ββββββββββββββββββββββββββββββββββββ
ci: check ## Same as 'check' β run full CI locally
# ββ Formatting ββββββββββββββββββββββββββββββββββββββββββββββ
fmt: ## Auto-format all code
cargo fmt --all
ruff format agents/
cd dashboard && npx prettier --write src/
# ββ Clean ββββββββββββββββββββββββββββββββββββββββββββββββββββ
clean: ## Clean build artifacts
cargo clean
cd dashboard && rm -rf dist node_modules