#!/bin/bash

set -e

# run linting of python files
echo 'Running ruff...'

uv run ruff check airflow_tools tests --no-cache
uv run ruff format airflow_tools tests --check --no-cache

# run pytest with args set
echo 'Running tests...'
PYTHONDONTWRITEBYTECODE=1 COVERAGE_FILE=build/.coverage uv run pytest -v tests/ \
		-p no:cacheprovider \
		--cov airflow_tools \
		--cov-report xml:build/coverage.xml \
		--cov-report term \
		--junitxml=build/pyunit.xml

echo 'Done!'
