-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
41 lines (35 loc) · 1.6 KB
/
Makefile
File metadata and controls
41 lines (35 loc) · 1.6 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
.PHONY: dev prod down logs validate-problems test-integration
dev:
docker compose --profile prod down --remove-orphans
DEV_MODE=1 docker compose --profile dev up --build
prod:
docker compose --profile prod pull
docker compose --profile prod build backup
docker compose --profile prod up -d
down:
docker compose --profile prod down --remove-orphans
docker compose --profile dev down --remove-orphans
logs:
docker compose logs -f
# Run the problem validator against every problem YAML in all installed
# languages (python/javascript/go/java). Mirrors the `validate` CI job — use
# this to catch harness/content regressions before pushing. Requires
# backend/.venv and the relevant runtimes on PATH. Missing runtimes are
# skipped with a warning.
validate-problems:
@if [ ! -x backend/.venv/bin/python ]; then \
echo "error: backend/.venv not found. Create it with:"; \
echo " cd backend && python3 -m venv .venv && .venv/bin/pip install -r requirements.txt -r requirements-test.txt"; \
exit 1; \
fi
cd backend && .venv/bin/python scripts/validate_problems.py
# Run the integration test suite. Requires `make dev` running in another
# terminal so judge0-server is reachable at localhost:2358. Tests use a
# TestContainers Postgres so they do not touch the dev database.
test-integration:
@if [ ! -x backend/.venv/bin/python ]; then \
echo "error: backend/.venv not found. Create it with:"; \
echo " cd backend && python3 -m venv .venv && .venv/bin/pip install -r requirements.txt -r requirements-test.txt"; \
exit 1; \
fi
cd backend && .venv/bin/python -m pytest tests/integration/ -m integration -v