This commit is contained in:
+23
-6
@@ -3,10 +3,27 @@ set -euo pipefail
|
||||
cd "$(dirname "$0")/.."
|
||||
|
||||
mkdir -p local
|
||||
uv run ruff check .
|
||||
uv run python manage.py check
|
||||
uv run python manage.py makemigrations --check --dry-run
|
||||
uv run pytest --cov=apps --cov=config --cov-report=term-missing
|
||||
python scripts/validate_task_ledger.py
|
||||
python scripts/validate_repository.py
|
||||
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'
|
||||
|
||||
Reference in New Issue
Block a user