#!/usr/bin/env bash

set -e

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

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

echo "Running ruff formatter check..."
uv run ruff format sdlc_training_charliet 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 sdlc_training_charliet \
  --cov-report xml:build/coverage.xml \
  --cov-report term \
  --junitxml=build/pyunit.xml
