mirror of
https://github.com/enpaul/kodak.git
synced 2024-11-14 10:36:55 +00:00
91 lines
1.9 KiB
INI
91 lines
1.9 KiB
INI
[tox]
|
|
envlist =
|
|
py{37,38,39}
|
|
static
|
|
static-tests
|
|
security
|
|
isolated_build = true
|
|
skip_missing_interpreters = true
|
|
|
|
[testenv]
|
|
description = Run the tests
|
|
require_locked_deps = true
|
|
require_poetry = true
|
|
locked_deps =
|
|
openapi-spec-validator
|
|
pytest
|
|
pytest-cov
|
|
ruamel.yaml
|
|
toml
|
|
commands =
|
|
pytest {toxinidir}/tests/ \
|
|
--cov {toxinidir}/kodak \
|
|
--cov-config {toxinidir}/.coveragerc \
|
|
--cov-report term-missing
|
|
|
|
[testenv:static]
|
|
description = Static formatting and quality enforcement
|
|
basepython = python3.8
|
|
ignore_errors = true
|
|
locked_deps =
|
|
black
|
|
blacken-docs
|
|
mdformat
|
|
mdformat-gfm
|
|
mypy
|
|
reorder-python-imports
|
|
pre-commit
|
|
pre-commit-hooks
|
|
pylint
|
|
commands =
|
|
pre-commit run \
|
|
--all-files
|
|
pylint {toxinidir}/kodak/ \
|
|
--rcfile {toxinidir}/.pylintrc
|
|
mypy {toxinidir}/kodak/ \
|
|
--ignore-missing-imports \
|
|
--no-strict-optional
|
|
|
|
[testenv:static-tests]
|
|
description = Static formatting and quality enforcement for the tests
|
|
basepython = python3.8
|
|
ignore_errors = true
|
|
locked_deps =
|
|
mypy
|
|
pylint
|
|
pytest
|
|
openapi-spec-validator
|
|
commands =
|
|
pylint {toxinidir}/tests/ \
|
|
--rcfile {toxinidir}/.pylintrc
|
|
mypy {toxinidir}/tests/ \
|
|
--ignore-missing-imports \
|
|
--no-strict-optional
|
|
|
|
[testenv:security]
|
|
description = Security checks
|
|
basepython = python3.8
|
|
skip_install = true
|
|
ignore_errors = true
|
|
locked_deps =
|
|
bandit
|
|
safety
|
|
poetry
|
|
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
|