2020-09-23 06:17:30 +00:00
|
|
|
[tox]
|
2021-12-04 16:34:36 +00:00
|
|
|
envlist = py36, py37, py38, py39, py310, static, static-tests, security
|
2020-09-23 06:17:30 +00:00
|
|
|
isolated_build = true
|
2020-11-26 17:54:14 +00:00
|
|
|
skip_missing_interpreters = true
|
2020-09-23 06:17:30 +00:00
|
|
|
|
|
|
|
[testenv]
|
2020-09-24 00:36:11 +00:00
|
|
|
description = Run the tests
|
2020-09-26 14:45:47 +00:00
|
|
|
require_locked_deps = true
|
2021-04-20 03:47:20 +00:00
|
|
|
require_poetry = true
|
2020-12-05 03:28:27 +00:00
|
|
|
extras =
|
|
|
|
poetry
|
2020-11-12 05:25:40 +00:00
|
|
|
locked_deps =
|
2020-09-25 01:55:23 +00:00
|
|
|
pytest
|
|
|
|
pytest-cov
|
|
|
|
toml
|
2020-09-23 06:17:30 +00:00
|
|
|
commands =
|
2021-04-17 02:33:24 +00:00
|
|
|
pytest --cov {toxinidir}/tox_poetry_installer --cov-config {toxinidir}/.coveragerc --cov-report term-missing {toxinidir}/tests/
|
2020-09-24 00:36:11 +00:00
|
|
|
|
|
|
|
[testenv:static]
|
2020-09-25 01:55:23 +00:00
|
|
|
description = Static formatting and quality enforcement
|
|
|
|
basepython = python3.8
|
2020-11-12 03:34:42 +00:00
|
|
|
platform = linux
|
2020-09-24 00:36:11 +00:00
|
|
|
ignore_errors = true
|
2020-11-12 05:25:40 +00:00
|
|
|
locked_deps =
|
2020-09-24 00:36:11 +00:00
|
|
|
black
|
2020-11-26 17:41:06 +00:00
|
|
|
blacken-docs
|
2021-04-16 05:26:12 +00:00
|
|
|
mdformat
|
|
|
|
mdformat-gfm
|
|
|
|
mypy
|
2020-09-24 00:36:11 +00:00
|
|
|
reorder-python-imports
|
2021-04-16 05:26:12 +00:00
|
|
|
pre-commit
|
|
|
|
pre-commit-hooks
|
2020-11-26 17:41:06 +00:00
|
|
|
pylint
|
2020-09-24 00:36:11 +00:00
|
|
|
commands =
|
|
|
|
pre-commit run --all-files
|
2020-11-12 03:34:42 +00:00
|
|
|
pylint --rcfile {toxinidir}/.pylintrc {toxinidir}/tox_poetry_installer/
|
|
|
|
mypy --ignore-missing-imports --no-strict-optional {toxinidir}/tox_poetry_installer/
|
2020-09-25 01:55:23 +00:00
|
|
|
|
|
|
|
[testenv:static-tests]
|
|
|
|
description = Static formatting and quality enforcement for the tests
|
|
|
|
basepython = python3.8
|
2020-11-12 03:34:42 +00:00
|
|
|
platform = linux
|
2021-04-17 02:33:24 +00:00
|
|
|
ignore_errors = true
|
2020-11-12 05:25:40 +00:00
|
|
|
locked_deps =
|
2020-09-25 01:55:23 +00:00
|
|
|
pylint
|
2021-04-17 02:33:24 +00:00
|
|
|
pytest
|
2020-09-25 01:55:23 +00:00
|
|
|
mypy
|
|
|
|
commands =
|
2020-11-26 17:41:06 +00:00
|
|
|
pylint --rcfile {toxinidir}/.pylintrc {toxinidir}/tests/
|
|
|
|
mypy --ignore-missing-imports --no-strict-optional {toxinidir}/tests/
|
2020-09-24 00:36:11 +00:00
|
|
|
|
|
|
|
[testenv:security]
|
|
|
|
description = Security checks
|
2020-09-25 01:55:23 +00:00
|
|
|
basepython = python3.8
|
2020-11-12 03:34:42 +00:00
|
|
|
platform = linux
|
2021-04-17 02:33:24 +00:00
|
|
|
ignore_errors = true
|
2020-11-12 05:25:40 +00:00
|
|
|
locked_deps =
|
2020-09-24 00:36:11 +00:00
|
|
|
bandit
|
|
|
|
safety
|
2020-09-25 01:55:23 +00:00
|
|
|
poetry
|
2020-09-24 00:36:11 +00:00
|
|
|
commands =
|
2020-11-12 03:34:42 +00:00
|
|
|
bandit --recursive --quiet {toxinidir}/tox_poetry_installer/
|
|
|
|
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
|