30 lines
897 B
Bash
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'
|