-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
58 lines (39 loc) Β· 2.67 KB
/
Copy pathMakefile
File metadata and controls
58 lines (39 loc) Β· 2.67 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
.PHONY: test test-backend test-frontend test-tool-server lint typecheck build dev clean
# ββ Testing ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
test: test-backend test-frontend ## Run all tests
@echo "All tests passed."
test-backend: ## Run backend pytest suite
cd backend && python -m pytest tests/ --tb=short -q
test-frontend: ## Run frontend vitest suite
cd frontend && npx vitest run
test-tool-server: ## Run tool server tests
cd tool_server && python -m pytest tests/ --tb=short -q
test-backend-cov: ## Run backend tests with coverage report
cd backend && python -m pytest tests/ --tb=short --cov-report=html
# ββ Linting & Type Checking βββββββββββββββββββββββββββββββββββββββββββββββββ
lint: ## Run frontend linter
cd frontend && npm run lint
typecheck: ## Run TypeScript type checking
cd frontend && npm run typecheck
# ββ Docker βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
build: ## Build all Docker images
docker compose build
dev: ## Start development environment
docker compose -f docker-compose.dev.yml up
up: ## Start production environment
docker compose up -d
down: ## Stop all containers
docker compose down
# ββ Docker Testing βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
docker-test: ## Run tests inside Docker containers
docker compose -f docker-compose.test.yml run --rm backend-test
docker compose -f docker-compose.test.yml run --rm frontend-test
docker compose -f docker-compose.test.yml down
# ββ Utilities ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
clean: ## Remove build artifacts and caches
find . -type d -name __pycache__ -exec rm -rf {} + 2>/dev/null || true
find . -type d -name .pytest_cache -exec rm -rf {} + 2>/dev/null || true
find . -type d -name node_modules -prune -o -type d -name dist -exec rm -rf {} + 2>/dev/null || true
rm -rf backend/htmlcov backend/.coverage
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}'