Repository navigation
Expand file tree
/
Copy pathMakefile
More file actions
60 lines (46 loc) · 1.48 KB
/
Copy pathMakefile
File metadata and controls
60 lines (46 loc) · 1.48 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
.PHONY: all install test lint format format-check typecheck check dev clean session-key
.PHONY: infra-stage infra-prod infra-o11y
all: check
install:
@uv sync --frozen
test: install
@uv run --frozen pytest -n3
@npx vitest run
lint: install
@echo "linting..."
@uv run --frozen ruff check .
@npm run lint
format: install
@echo "formatting..."
@uv run --frozen ruff format .
@npm run format
format-check: install
@echo "checking formatting..."
@uv run --frozen ruff format --check .
@npm run format:check
typecheck: install
@echo "static code analysis..."
@uv run --frozen pyright
check: lint format-check typecheck test
dev: install
@echo "starting bot (-dmt) and api (-da)..."
@trap 'kill 0' EXIT INT TERM; \
uv run --frozen spellbot -dmt < /dev/null & \
uv run --frozen spellbot -da < /dev/null & \
wait
session-key: install
@uv run --frozen python -c "from cryptography.fernet import Fernet; print(Fernet.generate_key().decode())"
clean:
@echo "cleaning runtime artifacts..."
@rm -rf .coverage .pytest_cache .ruff_cache dist htmlcov
@find . -name "__pycache__" -o -name "*.pyc" | xargs rm -rf
@rm -rf node_modules
infra-stage:
@echo "Deploying app infrastructure to stage..."
@cd infrastructure/app && terraform apply -target=module.stage
infra-prod:
@echo "Deploying app infrastructure to prod..."
@cd infrastructure/app && terraform apply -target=module.prod
infra-o11y:
@echo "Deploying observability infrastructure..."
@cd infrastructure/o11y && terraform apply