kodak/tox.ini

91 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
2020-09-16 07:41:53 +00:00
isolated_build = true
skip_missing_interpreters = true
[testenv]
description = Run the tests
require_locked_deps = true
2021-05-08 02:02:43 +00:00
require_poetry = true
locked_deps =
openapi-spec-validator
pytest
pytest-cov
ruamel.yaml
toml
2020-09-16 07:41:53 +00:00
commands =
pytest {toxinidir}/tests/ \
--cov {toxinidir}/kodak \
--cov-config {toxinidir}/.coveragerc \
--cov-report term-missing
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
locked_deps =
black
blacken-docs
2021-05-02 22:12:04 +00:00
mdformat
mdformat-gfm
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 {toxinidir}/kodak/ \
--rcfile {toxinidir}/.pylintrc
mypy {toxinidir}/kodak/ \
--ignore-missing-imports \
--no-strict-optional
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
locked_deps =
mypy
pylint
pytest
openapi-spec-validator
2020-09-16 07:41:53 +00:00
commands =
pylint {toxinidir}/tests/ \
--rcfile {toxinidir}/.pylintrc
mypy {toxinidir}/tests/ \
--ignore-missing-imports \
--no-strict-optional
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 {toxinidir}/kodak/ \
--recursive \
--quiet
bandit {toxinidir}/tests/ \
--recursive \
--quiet \
--skip B101
poetry export \
--format requirements.txt \
--output {envtmpdir}/requirements.txt \
--without-hashes \
--dev
safety check \
--json \
--file {envtmpdir}/requirements.txt \
--ignore 42050 # werkzeug defaults update in 2.0.2