kodak/tox.ini

75 lines
1.9 KiB
INI
Raw Normal View History

2020-09-16 07:41:53 +00:00
[tox]
envlist =
py{37,38,39}
static
static-tests
security
docs
2020-09-16 07:41:53 +00:00
isolated_build = true
skip_missing_interpreters = true
[testenv]
description = Run the tests
require_locked_deps = true
locked_deps =
pytest
pytest-cov
toml
2020-09-16 07:41:53 +00:00
commands =
pytest --cov={envsitepackagesdir}/imagemonk --cov-config {toxinidir}/.coveragerc --cov-report term-missing {toxinidir}/tests/
2020-09-16 07:41:53 +00:00
[testenv:static]
description = Static formatting and quality enforcement
basepython = python3.8
2020-09-16 07:41:53 +00:00
ignore_errors = true
skip_install = true
locked_deps =
black
blacken-docs
mypy
reorder-python-imports
pre-commit
pre-commit-hooks
pylint
2020-09-16 07:41:53 +00:00
commands =
pre-commit run --all-files
pylint --rcfile {toxinidir}/.pylintrc {toxinidir}/imagemonk/
mypy --ignore-missing-imports --no-strict-optional {toxinidir}/imagemonk/
2020-09-16 07:41:53 +00:00
[testenv:static-tests]
description = Static formatting and quality enforcement for the tests
basepython = python3.8
2020-09-16 07:41:53 +00:00
ignore_errors = true
skip_install = true
locked_deps =
pylint
mypy
2020-09-16 07:41:53 +00:00
commands =
pylint --rcfile {toxinidir}/.pylintrc {toxinidir}/tests/
mypy --ignore-missing-imports --no-strict-optional {toxinidir}/tests/
2020-09-16 07:41:53 +00:00
[testenv:security]
description = Security checks
basepython = python3.8
skip_install = true
2020-09-16 07:41:53 +00:00
ignore_errors = true
locked_deps =
bandit
safety
poetry
2020-09-16 07:41:53 +00:00
commands =
bandit --recursive --quiet {toxinidir}/imagemonk/
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-09-16 07:41:53 +00:00
[testenv:docs]
description = Build the documentation
basepython = python3.8
locked_deps =
sphinx
sphinx-autodoc-typehints
2020-09-16 07:41:53 +00:00
commands =
sphinx-apidoc --no-toc --output-dir {toxinidir}/docs/ {toxinidir}/imagemonk/
sphinx-build -W -b html {toxinidir}/docs/ {toxinidir}/docs/_build