mirror of
https://github.com/enpaul/kodak.git
synced 2024-11-14 10:36:55 +00:00
70 lines
1.7 KiB
INI
70 lines
1.7 KiB
INI
|
[tox]
|
||
|
envlist = py37, py38, static, static-tests, security, docs
|
||
|
isolated_build = true
|
||
|
skip_missing_interpreters = true
|
||
|
|
||
|
[testenv]
|
||
|
description = Run the tests
|
||
|
deps =
|
||
|
pytest == 5.4.3
|
||
|
pytest-cov == 2.9.0
|
||
|
toml == 0.10.1
|
||
|
commands =
|
||
|
pytest --cov={envsitepackagesdir}/imagemonk --cov-config ./.coveragerc tests/ --cov-report term-missing
|
||
|
|
||
|
[testenv:static]
|
||
|
description = Static code analysis
|
||
|
basepython = python3.7
|
||
|
ignore_errors = true
|
||
|
deps =
|
||
|
pre-commit == 2.4.0
|
||
|
pylint == 2.5.2
|
||
|
mypy == 0.782
|
||
|
commands =
|
||
|
pre-commit run --all-files
|
||
|
pylint imagemonk/
|
||
|
mypy imagemonk/ --ignore-missing-imports --no-strict-optional
|
||
|
|
||
|
[testenv:static-tests]
|
||
|
description = Tests code analysis for tests
|
||
|
basepython = python3.7
|
||
|
ignore_errors = true
|
||
|
deps =
|
||
|
pre-commit == 2.4.0
|
||
|
pylint == 2.5.2
|
||
|
mypy == 0.782
|
||
|
pytest == 5.4.3
|
||
|
allowlist_externals =
|
||
|
bash
|
||
|
commands =
|
||
|
pre-commit run --all-files
|
||
|
bash -c "pylint tests/*.py"
|
||
|
mypy tests/ --ignore-missing-imports --no-strict-optional
|
||
|
|
||
|
[testenv:security]
|
||
|
description = Security checks (bandit+safety)
|
||
|
basepython = python3.7
|
||
|
ignore_errors = true
|
||
|
deps =
|
||
|
bandit == 1.6.2
|
||
|
safety == 1.9.0
|
||
|
allowlist_externals =
|
||
|
bash
|
||
|
commands =
|
||
|
bandit imagemonk/ --recursive
|
||
|
bandit tests/ --recursive --skip B101
|
||
|
bash -c "poetry export --format requirements.txt --without-hashes --dev | safety check --stdin --bare"
|
||
|
|
||
|
[testenv:docs]
|
||
|
description = Build the html documentation with Sphinx
|
||
|
basepython = python3.7
|
||
|
deps =
|
||
|
sphinx == 3.0.4
|
||
|
sphinx-autodoc-typehints == 1.10.3
|
||
|
allowlist_externals =
|
||
|
rm
|
||
|
commands =
|
||
|
sphinx-apidoc -o docs/ imagemonk
|
||
|
rm docs/modules.rst
|
||
|
sphinx-build -M html docs/ docs/_build -W
|