39 lines
1.1 KiB
Makefile
39 lines
1.1 KiB
Makefile
PYTHON ?= .venv/bin/python
|
|
BOOTSTRAP_PYTHON ?= python3
|
|
NPM ?= npm
|
|
|
|
.PHONY: setup install test-fast test-integration test-security lint typecheck frontend-build check-v1-absent check
|
|
|
|
setup:
|
|
test -x $(PYTHON) || $(BOOTSTRAP_PYTHON) -m venv .venv
|
|
$(PYTHON) -m pip install --upgrade pip
|
|
$(PYTHON) -m pip install -e 'backend[dev]'
|
|
$(NPM) --prefix frontend ci
|
|
|
|
install: setup
|
|
|
|
test-fast:
|
|
$(PYTHON) -m pytest tests/unit tests/contract -q
|
|
|
|
test-integration:
|
|
$(PYTHON) -m pytest tests/integration -q
|
|
|
|
test-security:
|
|
$(PYTHON) -m pytest tests/security -q
|
|
|
|
lint:
|
|
$(PYTHON) -m ruff check --config backend/pyproject.toml backend/src backend/alembic tests tools
|
|
$(PYTHON) -m ruff format --check --config backend/pyproject.toml backend/src backend/alembic tests tools
|
|
|
|
typecheck:
|
|
$(PYTHON) -m mypy --config-file backend/pyproject.toml
|
|
$(NPM) --prefix frontend run typecheck
|
|
|
|
frontend-build:
|
|
$(NPM) --prefix frontend run build
|
|
|
|
check-v1-absent:
|
|
$(PYTHON) tools/forbidden_v1_scan.py .
|
|
|
|
check: check-v1-absent test-fast test-integration test-security lint typecheck frontend-build
|