#!/bin/bash

set -euo pipefail

mkdir -p build

echo 'Running linting...'

uv run --group dev --frozen -- \
	flake8 abacus_contract/ tests/ application.py dev.py

echo 'Running unit and functional tests...'

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

echo 'Done!'
