#!/bin/bash

set -e

# run linting of python files
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


# run pytest with args set
echo 'Running tests...'
PYTHONDONTWRITEBYTECODE=1 COVERAGE_FILE=build/.coverage uv run --group dev --frozen -- python -m pytest -v --ignore=tests/integration/ tests/ \
		-p no:cacheprovider \
		--cov abacus_legacy_sync \
		--cov-report xml:build/coverage.xml \
		--cov-report term \
		--junitxml=build/pyunit.xml

echo 'Done!'
