1
0
mirror of https://github.com/enpaul/keyosk.git synced 2024-09-28 19:54:01 +00:00
keyosk/tox.ini
Ethan Paul ca891dd1fb
Overhaul repository with newest bestest practices
Add typing stub file
Add metadata tests
Add missing dev dependencies
Add merge conflict check pre-commit
Add tox env for py3.9
Update license from MIT to GPL3
Update pyproject with pypi metadata
Update makefile to reduce duplication and add missing targets
Update dependencies to latest versions
Update pre-commit config to piggy back on poetry env
Update pyproject to use poetry-core
Update toxfile to use locked dependencies
Remove unused codeowners file
Remove placeholder test
2020-11-26 01:33:41 -05:00

79 lines
2.0 KiB
INI

[tox]
envlist = py36, py37, py38, py39, static, static-tests, security, docs
isolated_build = true
skip_missing_interpreters = true
[testenv]
description = Run the tests
require_locked_deps = true
locked_deps =
pytest
pytest-cov
toml
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 =
pre-commit
black
blacken-docs
reorder-python-imports
pylint
mypy
commands =
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
mypy
commands =
pylint --rcfile {toxinidir}/.pylintrc {toxinidir}/tests/
mypy --ignore-missing-imports --no-strict-optional {toxinidir}/tests/
[testenv:security]
description = Security checks
basepython = python3.8
platform = linux
ingore_errors = true
require_locked_deps = true
skip_install = true
locked_deps =
bandit
safety
allowlist_externals =
poetry
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
[testenv:docs]
description = Build sphinx documentation
basepython = python3.8
platform = linux
require_locked_deps = true
locked_deps =
sphinx
sphinx-autodoc-typehints
allowlist_externals =
rm
commands =
sphinx-apidoc -o "{toxinidir}/docs/" "keyosk"
rm "{toxinidir}/docs/modules.rst"
sphinx-build -M html "{toxinidir}/docs/" "{toxinidir}/docs/_build"