keyosk/tox.ini

53 lines
1.2 KiB
INI

[tox]
envlist = py37, py36, lint, typing, security, docs
isolated_build = true
[testenv]
description = Run the unit tests (pytest)
deps =
marshmallow == 3.5.0
passlib == 1.7.2
peewee == 3.13.1
pytest == 5.3.5
pytest-cov == 2.8.1
toml == 0.10.0
commands =
pytest --cov={envsitepackagesdir}/keyosk --cov-config .coveragerc tests/ --cov-report term-missing
[testenv:lint]
description = Check code formatting against black and pylint
deps =
pre-commit == 2.1.0
pylint == 2.3.1
astroid == 2.2.5
commands =
pre-commit run --all-files
pylint keyosk
[testenv:typing]
description = Check type annotations with mypy
deps =
mypy == 0.761
commands =
mypy keyosk --ignore-missing-imports --no-strict-optional
[testenv:security]
description = Check security vulnerabilities (bandit)
deps =
bandit == 1.6.2
commands =
bandit --recursive keyosk
[testenv:docs]
description = Build documentation to check RST syntax (sphinx)
deps =
sphinx == 2.4.2
sphinx-autodoc-typehints == 1.10.3
whitelist_externals =
rm
commands =
sphinx-apidoc -o "./docs/" "keyosk"
rm "docs/modules.rst"
sphinx-build -M html "./docs/" "./docs/_build" -W
sphinx-build -M latex "./docs/" "./docs/_build" -W