#!/bin/bash

set -euo pipefail

mkdir -p build

echo 'Running linting...'

uv run --group dev --frozen -- \
    ruff check --no-cache

echo 'Running formatting...'

uv run --group dev --frozen -- \
    ruff format --check --no-cache

echo 'Running unit and functional tests...'

COVERAGE_FILE=build/.coverage \
PYTHONDONTWRITEBYTECODE=1 \
uv run --group dev --frozen -- \
	pytest tests/ \
	--cov abacus_schedule \
	--cov-report term \
	--cov-report xml:build/coverage.xml \
	--ignore=tests/integration/ \
	--junitxml=build/pyunit.xml \
	-p no:cacheprovider \
	-v

echo 'Done!'
