#!/bin/bash

set -e

# run linting of python and yaml files
echo 'Running linting...'
uv run pyright
uv run ruff check
uv run ruff format --check

# run pytest with args set
echo 'Running tests...'
uv run pytest -v tests/unit/ \
    --cov url_shortener \
    --cov-report xml:build/coverage.xml \
    --cov-report term \
    --junitxml=build/pyunit.xml

echo 'Done!'
