-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
50 lines (40 loc) · 1.31 KB
/
Makefile
File metadata and controls
50 lines (40 loc) · 1.31 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
PYTHON ?= ./.venv/bin/python
ALICEBOT ?= ./.venv/bin/alicebot
PNPM ?= pnpm
WEB_DIR ?= apps/web
.PHONY: setup migrate dev doctor vnext scheduler alpha-check test-web test-python
setup:
@test -f .env || cp .env.example .env
@test -f .env.lite || cp .env.lite.example .env.lite
@test -f $(WEB_DIR)/.env.local || cp $(WEB_DIR)/.env.local.example $(WEB_DIR)/.env.local
./scripts/validate_env.sh .env .env.lite $(WEB_DIR)/.env.local
python3 -m venv .venv
$(PYTHON) -m pip install -e '.[dev]'
PNPM="$(PNPM)" WEB_DIR="$(WEB_DIR)" ./scripts/pnpm_web_install.sh
@echo "Setup complete. Next: make migrate && make doctor"
migrate:
./scripts/dev_up.sh
doctor:
$(ALICEBOT) vnext doctor --fix-safe --ci
dev:
./scripts/dev_up.sh
APP_RELOAD=false ./scripts/api_dev.sh & \
api_pid=$$!; \
$(PNPM) --dir $(WEB_DIR) dev & \
web_pid=$$!; \
trap 'kill $$api_pid $$web_pid 2>/dev/null || true' INT TERM EXIT; \
wait $$api_pid $$web_pid
vnext:
@echo "Start the local runtime with: make dev"
@echo "Then open: http://localhost:3000/vnext"
scheduler:
$(ALICEBOT) vnext scheduler daemon start --foreground
alpha-check:
$(ALICEBOT) vnext alpha check
test-python:
$(PYTHON) -m pytest tests/unit -q
$(PYTHON) -m pytest tests/integration -q
test-web:
$(PNPM) --dir $(WEB_DIR) test
$(PNPM) --dir $(WEB_DIR) lint
$(PNPM) --dir $(WEB_DIR) build