[tox]
envlist = py37,py38,py39,py310,311,pyright,black,docs
skipsdist = True
skip_missing_interpreters = True

[gh-actions]
python =
    3.7: py37
    3.8: py38
    3.9: py39
    3.10: py310
    3.11: py311, black, pyright, pycodestyle

[pytest]
addopts = --show-capture=log --log-cli-level=error

[base]
deps =
	-r requirements.txt
	-r test-requirements.txt
module = alise

[testenv]
deps = {[base]deps}
commands = pytest

[testenv:py311]
deps =
	{[base]deps}
	coverage-badge
commands =
	pytest --cov={[base]module} --cov-report=term-missing:skip-covered
	coverage-badge -f -o coverage.svg


[testenv:report]
deps =
       {[base]deps}
       coverage
skip_install = true
commands =
    pytest -v --cov={[base]module} --cov-append --cov-report=term-missing
    coverage report
    coverage html


[testenv:pylint]
deps =
	{[base]deps}
	pylint
commands = pylint --exit-zero ./{[base]module}

[testenv:black]
deps = black
commands = black -l 100 --check --diff ./{[base]module}

[testenv:pyright]
deps =
	{[base]deps}
	pyright
commands = pyright ./{[base]module}

[testenv:pycodestyle]
deps =
	{[base]deps}
    pycodestyle
commands = pycodestyle ./{[base]module}

[testenv:docs]
deps =
	-r requirements.txt
	-r doc/source/requirements.txt
commands = sphinx-build doc/source doc/build
