#!/bin/bash

set -e

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

flake8 main.py config.py
isort --check main.py config.py
black --check main.py config.py

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

echo 'Done!'
