#!/bin/bash

set -e

# run linting of python files
echo 'Running ruff...'


uv run ruff check dev.py pdp tests --no-cache
uv run ruff format dev.py pdp tests --check --no-cache

echo 'Running mypy...'
uv run mypy --cache-dir=/dev/null pdp/ tests/

# run pytest with args set
echo 'Running tests...'
PYTHONDONTWRITEBYTECODE=1 COVERAGE_FILE=build/.coverage uv run pytest -v tests/unit/ \
		-p no:cacheprovider \
		--cov pdp \
		--cov-report xml:build/coverage.xml \
		--cov-report term \
		--junitxml=build/pyunit.xml

echo 'Done!'
