-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
81 lines (62 loc) · 2.51 KB
/
Makefile
File metadata and controls
81 lines (62 loc) · 2.51 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
76
77
78
79
80
81
.PHONY: help dev dev-front dev-back test test-front test-back coverage coverage-front coverage-back build check check-front check-back format format-front format-back install migrate
help:
@echo "hookdiff — available make targets:"
@echo ""
@echo " Combined:"
@echo " make dev start frontend + backend concurrently"
@echo " make test run all tests"
@echo " make coverage run all tests with coverage gate"
@echo " make check run biome + ruff checks"
@echo " make format run biome + ruff fixes"
@echo ""
@echo " Frontend:"
@echo " make dev-front start the Vite dev server on port 5173"
@echo " make test-front run frontend tests once"
@echo " make coverage-front run frontend tests with coverage gate"
@echo " make build build the frontend for production"
@echo " make check-front run biome lint + format check"
@echo " make format-front auto-fix biome lint + format issues"
@echo " make install install frontend dependencies"
@echo ""
@echo " Backend:"
@echo " make dev-back start Django dev server via Uvicorn on port 8000"
@echo " make test-back run backend tests once"
@echo " make coverage-back run backend tests with coverage gate"
@echo " make check-back run ruff lint + format check"
@echo " make format-back auto-fix ruff lint + format issues"
@echo " make migrate run Django migrations"
# Combined
dev:
pnpm --dir frontend exec concurrently --kill-others --names "front,back" --prefix-colors "cyan,magenta" "make -C $(CURDIR) dev-front" "make -C $(CURDIR) dev-back"
test: test-front test-back
coverage: coverage-front coverage-back
check: check-front check-back
format: format-front format-back
# Frontend
dev-front:
pnpm --dir frontend dev
test-front:
pnpm --dir frontend test:run
coverage-front:
pnpm --dir frontend test:coverage
build:
pnpm --dir frontend build
check-front:
pnpm --dir frontend check
format-front:
pnpm --dir frontend format
install:
pnpm --dir frontend install
# Backend
dev-back:
cd backend && uv run uvicorn hookdiff.asgi:application --host 0.0.0.0 --port 8000 --reload
test-back:
cd backend && uv run pytest
coverage-back:
cd backend && uv run pytest --cov --cov-report=term-missing --cov-fail-under=100
check-back:
cd backend && uv run ruff check . && uv run ruff format --check . && uv run mypy .
format-back:
cd backend && uv run ruff check --fix . && uv run ruff format .
migrate:
cd backend && uv run python manage.py migrate