#!/usr/bin/env bash

set -e

# run linting of python files
echo 'Running mypy...'
uv run mypy --cache-dir=/dev/null ai_eval_runner tests

echo "Running ruff linter..."
uv run ruff check ai_eval_runner tests --no-cache

echo "Running ruff formatter check..."
uv run ruff format ai_eval_runner tests --diff --no-cache

# run pytest with args set
echo 'Running tests...'

PYTHONDONTWRITEBYTECODE=1 COVERAGE_FILE=build/.coverage uv run pytest tests/unit/ \
  -p no:cacheprovider \
  --cov ai_eval_runner \
  --cov-report xml:build/coverage.xml \
  --cov-report term \
  --junitxml=build/pyunit.xml
