mirror of
https://github.com/enpaul/keyosk.git
synced 2024-11-05 06:07:06 +00:00
65 lines
1.6 KiB
INI
65 lines
1.6 KiB
INI
[tox]
|
|
envlist = py36, py37, py38, format, static, static-tests, docs
|
|
skip_missing_interpreters = true
|
|
isolated_build = true
|
|
|
|
[testenv]
|
|
description = Run unit tests (pytest+{basepython})
|
|
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:format]
|
|
description = Enforce file formatting (pre-commit)
|
|
skip_install = true
|
|
deps =
|
|
pre-commit == 2.1.0
|
|
commands =
|
|
pre-commit run --all-files
|
|
|
|
[testenv:static]
|
|
description = Static code analysis (mypy+pylint+bandit)
|
|
ignore_errors = true
|
|
deps =
|
|
pylint == 2.3.1
|
|
astroid == 2.2.5
|
|
mypy == 0.761
|
|
bandit == 1.6.2
|
|
commands =
|
|
mypy keyosk --ignore-missing-imports --no-strict-optional
|
|
pylint keyosk --rcfile .pylintrc
|
|
bandit --recursive keyosk
|
|
|
|
[testenv:static-tests]
|
|
description = Static code analysis for the tests (mypy+pylint+bandit)
|
|
ignore_errors = true
|
|
deps =
|
|
pytest == 5.3.5
|
|
pylint == 2.3.1
|
|
astroid == 2.2.5
|
|
mypy == 0.761
|
|
bandit == 1.6.2
|
|
commands =
|
|
mypy tests --ignore-missing-imports --no-strict-optional
|
|
pylint tests --rcfile .pylintrc
|
|
bandit --recursive tests --skip B101
|
|
|
|
[testenv:docs]
|
|
description = Build documentation (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
|