Files
VacatureRadar/scripts/codex_verify.sh
2026-07-22 05:12:07 +02:00

30 lines
897 B
Bash

#!/usr/bin/env bash
set -euo pipefail
cd "$(dirname "$0")/.."
mkdir -p local
if command -v uv >/dev/null 2>&1; then
PYTHON=(uv run python)
RUFF=(uv run ruff)
PYTEST=(uv run pytest)
elif [[ -x .venv/Scripts/python.exe ]]; then
PYTHON=(.venv/Scripts/python.exe)
RUFF=(.venv/Scripts/python.exe -m ruff)
PYTEST=(.venv/Scripts/python.exe -m pytest)
elif [[ -x .venv/bin/python ]]; then
PYTHON=(.venv/bin/python)
RUFF=(.venv/bin/python -m ruff)
PYTEST=(.venv/bin/python -m pytest)
else
printf 'Geen uv of project-venv gevonden.\n' >&2
exit 1
fi
"${RUFF[@]}" check .
"${PYTHON[@]}" manage.py check
"${PYTHON[@]}" manage.py makemigrations --check --dry-run
"${PYTEST[@]}" --cov=apps --cov=config --cov-report=term-missing
"${PYTHON[@]}" scripts/validate_task_ledger.py
"${PYTHON[@]}" scripts/validate_repository.py
printf '\nAlle kwaliteitsgates geslaagd.\n'