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

79 lines
2.0 KiB
INI
Raw Normal View History

[tox]
envlist = py36, py37, py38, py39, static, static-tests, security, docs
2020-02-19 03:37:39 +00:00
isolated_build = true
skip_missing_interpreters = true
2020-02-19 03:37:39 +00:00
[testenv]
description = Run the tests
require_locked_deps = true
locked_deps =
2020-02-19 03:37:39 +00:00
pytest
pytest-cov
toml
2020-02-19 04:02:43 +00:00
commands =
pytest --cov={envsitepackagesdir}/keyosk --cov-config {toxinidir}/.coveragerc --cov-report term-missing {toxinidir}/tests/
[testenv:static]
description = Static formatting and quality enforcement
basepython = python3.8
platform = linux
ignore_errors = true
require_locked_deps = true
locked_deps =
2020-02-19 03:37:39 +00:00
pre-commit
black
blacken-docs
reorder-python-imports
pylint
mypy
commands =
2020-02-19 03:37:39 +00:00
pre-commit run --all-files
pylint --rcfile {toxinidir}/.pylintrc {toxinidir}/keyosk/
mypy --ignore-missing-imports --no-strict-optional {toxinidir}/keyosk/
[testenv:static-tests]
description = Static formatting and quality enforcement for the tests
basepython = python3.8
platform = linux
ignore_errors = true
require_locked_deps = true
locked_deps =
pylint
2020-02-19 03:37:39 +00:00
mypy
2020-02-19 04:02:43 +00:00
commands =
pylint --rcfile {toxinidir}/.pylintrc {toxinidir}/tests/
mypy --ignore-missing-imports --no-strict-optional {toxinidir}/tests/
2020-02-19 03:37:39 +00:00
[testenv:security]
description = Security checks
basepython = python3.8
platform = linux
ingore_errors = true
require_locked_deps = true
skip_install = true
locked_deps =
2020-02-19 03:37:39 +00:00
bandit
safety
allowlist_externals =
poetry
2020-02-19 03:37:39 +00:00
commands =
bandit --recursive --quiet {toxinidir}/keyosk/
bandit --recursive --quiet --skip B101 {toxinidir}/tests/
poetry export --format requirements.txt --output {envtmpdir}/requirements.txt --without-hashes --dev
safety check --bare --file {envtmpdir}/requirements.txt
2020-02-19 03:37:39 +00:00
[testenv:docs]
description = Build sphinx documentation
basepython = python3.8
platform = linux
require_locked_deps = true
locked_deps =
sphinx
sphinx-autodoc-typehints
allowlist_externals =
2020-02-19 03:37:39 +00:00
rm
commands =
sphinx-apidoc -o "{toxinidir}/docs/" "keyosk"
rm "{toxinidir}/docs/modules.rst"
sphinx-build -M html "{toxinidir}/docs/" "{toxinidir}/docs/_build"