[tox]
envlist = {py38,py39,py310}
skip_missing_interpreters=True

[base] 
commands = python -m pip install -e .[dev]

[testenv]
deps =
    black
    coverage
    pytest
    pytest-cov
allowlist_externals =
    mkdir
commands =
    {[base]commands}
    {[testenv:black]commands}
    {[testenv:coverage]commands}

[testenv:black]
deps = black
commands = 
    {[base]commands}
    black --check -l 79 ./src/palaestrai_mosaik ./tests

[testenv:coverage]
deps = 
    coverage
    pytest
allowlist_externals=
    mkdir
commands = 
    mkdir -p {toxinidir}/test_reports
    coverage run -m pytest
    coverage xml -o test_reports/coverage.xml