-
Notifications
You must be signed in to change notification settings - Fork 103
Expand file tree
/
Copy pathMakefile
More file actions
74 lines (52 loc) · 2.28 KB
/
Makefile
File metadata and controls
74 lines (52 loc) · 2.28 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
.PHONY: help install test test-unit test-e2e test-e2e-headed lint format clean setup-dev build lint-frontend
help: ## Show this help message
@echo 'Usage: make [target]'
@echo ''
@echo 'Targets:'
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {printf " %-15s %s\n", $$1, $$2}' $(MAKEFILE_LIST)
install: ## Install dependencies
uv sync
npm ci --prefix ./app
setup-dev: install ## Set up development environment
uv run playwright install chromium
uv run playwright install-deps
@echo "Development environment setup complete!"
@echo "Don't forget to copy .env.example to .env and configure your settings"
build-dev:
npm --prefix ./app run build:dev
build-prod:
npm --prefix ./app run build
test: build-dev test-unit test-e2e ## Run all tests
test-unit: ## Run unit tests only
uv run python -m pytest tests/ -k "not e2e" --verbose
test-e2e: build-dev ## Run E2E tests headless
uv run python -m pytest tests/e2e/ --browser chromium --video=on --screenshot=on
test-e2e-headed: build-dev ## Run E2E tests with browser visible
uv run python -m pytest tests/e2e/ --browser chromium --headed
test-e2e-debug: build-dev ## Run E2E tests with debugging enabled
uv run python -m pytest tests/e2e/ --browser chromium --slowmo=1000
lint: ## Run linting (backend + frontend)
@echo "Running backend lint (pylint)"
uv run python -m pylint $(shell git ls-files '*.py')
@echo "Running frontend lint (eslint)"
make lint-frontend
lint-frontend: ## Run frontend lint (ESLint)
npm --prefix ./app run lint
format: ## Format code (placeholder - add black/autopep8 if needed)
@echo "Add code formatting tool like black here"
clean: ## Clean up test artifacts
rm -rf test-results/
rm -rf playwright-report/
rm -rf tests/e2e/screenshots/
rm -rf __pycache__/
find . -name "*.pyc" -delete
find . -name "*.pyo" -delete
run-dev: build-dev ## Run development server
uv run uvicorn api.index:app --host $${HOST:-127.0.0.1} --port $${PORT:-5000} --reload
run-prod: build-prod ## Run production server
uv run uvicorn api.index:app --host $${HOST:-0.0.0.0} --port $${PORT:-5000}
docker-falkordb: ## Start FalkorDB in Docker for testing
docker run -d --name falkordb-test -p 6379:6379 falkordb/falkordb:latest
docker-stop: ## Stop test containers
docker stop falkordb-test || true
docker rm falkordb-test || true