at main 975 B view raw
1# backend/justfile 2set shell := ["bash", "-eu", "-o", "pipefail", "-c"] 3default := "run" 4 5alias r := run 6 7# run backend server (hot reloads) 8run: 9 uv run uvicorn backend.main:app --reload --host 0.0.0.0 --port ${PORT:-8001} 10 11# run tests with docker-compose 12test *ARGS='tests/': 13 docker compose -f tests/docker-compose.yml up -d 14 uv run pytest {{ ARGS }} 15 docker compose -f tests/docker-compose.yml down 16 17# run integration tests (requires running backend and PLYRFM_API_TOKEN in .env) 18integration: 19 set -a && source ../.env && set +a && uv run pytest tests/test_integration_upload.py -m integration -v -s 20 21# run type checking and linting 22lint: 23 uv run ty check 24 uv run ruff check . 25 26# create a new database migration 27migrate MESSAGE: 28 uv run alembic revision --autogenerate -m "{{ MESSAGE }}" 29 30# upgrade database to latest migration 31migrate-up: 32 uv run alembic upgrade head 33 34# show current migration status 35migrate-status: 36 uv run alembic current