mirror of
https://github.com/enpaul/keyosk.git
synced 2024-08-24 18:43:48 +00:00
49 lines
1.1 KiB
INI
49 lines
1.1 KiB
INI
[tox]
|
|
envlist = py37, py36, lint, typing, security, docs
|
|
isolated_build = true
|
|
|
|
[testenv]
|
|
description = Run the unit tests (pytest)
|
|
deps =
|
|
pytest
|
|
pytest-cov
|
|
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
|
|
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
|
|
commands =
|
|
mypy keyosk --ignore-missing-imports --no-strict-optional
|
|
|
|
[testenv:security]
|
|
description = Check security vulnerabilities (bandit)
|
|
deps =
|
|
bandit
|
|
commands =
|
|
bandit --recursive keyosk
|
|
|
|
[testenv:docs]
|
|
description = Build documentation to check RST syntax (sphinx)
|
|
deps =
|
|
sphinx >= 1.7.5, < 2.0
|
|
sphinx-autodoc-typehints >= 1.3.0, < 2.0
|
|
whitelist_externals =
|
|
rm
|
|
commands =
|
|
sphinx-apidoc -o "./docs/" "keyosk"
|
|
rm "docs/modules.rst"
|
|
sphinx-build -M html "./docs/" "./docs/_build"
|
|
sphinx-build -M latex "./docs/" "./docs/_build"
|