1
0
mirror of https://github.com/enpaul/keyosk.git synced 2024-11-05 06:07:06 +00:00
keyosk/tox.ini

52 lines
1.1 KiB
INI
Raw Permalink Normal View History

[tox]
2020-02-19 03:37:39 +00:00
envlist = py37, py36, lint, typing, security, docs
isolated_build = true
[testenv]
description = Run the unit tests (pytest)
deps =
pytest
pytest-cov
toml
2020-02-23 21:11:39 +00:00
passlib
marshmallow
2020-02-19 04:02:43 +00:00
commands =
2020-02-24 01:24:39 +00:00
pytest --cov={envsitepackagesdir}/keyosk --cov-config .coveragerc tests/ --cov-report term-missing
[testenv:lint]
description = Check code formatting against black and pylint
deps =
2020-02-19 03:37:39 +00:00
pre-commit
pylint == 2.3.1
astroid == 2.2.5
commands =
2020-02-19 03:37:39 +00:00
pre-commit run --all-files
pylint keyosk
[testenv:typing]
description = Check type annotations with mypy
2020-02-19 04:02:43 +00:00
deps =
2020-02-19 03:37:39 +00:00
mypy
2020-02-19 04:02:43 +00:00
commands =
2020-02-19 03:37:39 +00:00
mypy keyosk --ignore-missing-imports --no-strict-optional
2020-02-19 03:37:39 +00:00
[testenv:security]
description = Check security vulnerabilities (bandit)
2020-02-19 04:02:43 +00:00
deps =
2020-02-19 03:37:39 +00:00
bandit
commands =
bandit --recursive keyosk
2020-02-19 03:37:39 +00:00
[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" -W
sphinx-build -M latex "./docs/" "./docs/_build" -W