2020-09-23 06:17:30 +00:00
|
|
|
[tox]
|
2023-02-24 22:49:31 +00:00
|
|
|
envlist = py37, py38, py39, py310, py311, static, static-tests, security
|
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-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 =
|
2022-01-05 06:13:44 +00:00
|
|
|
pytest {toxinidir}/tests/ \
|
|
|
|
--cov {toxinidir}/tox_poetry_installer \
|
|
|
|
--cov-config {toxinidir}/.coveragerc \
|
|
|
|
--cov-report term-missing
|
2020-09-24 00:36:11 +00:00
|
|
|
|
|
|
|
[testenv:static]
|
2020-09-25 01:55:23 +00:00
|
|
|
description = Static formatting and quality enforcement
|
2023-05-19 22:03:44 +00:00
|
|
|
basepython = py310
|
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
|
2022-01-05 06:40:02 +00:00
|
|
|
types-toml
|
2020-09-24 00:36:11 +00:00
|
|
|
commands =
|
2022-01-05 06:13:44 +00:00
|
|
|
pre-commit run \
|
|
|
|
--all-files
|
|
|
|
pylint {toxinidir}/tox_poetry_installer/ \
|
|
|
|
--rcfile {toxinidir}/.pylintrc
|
|
|
|
mypy {toxinidir}/tox_poetry_installer/ \
|
|
|
|
--ignore-missing-imports \
|
|
|
|
--no-strict-optional
|
2020-09-25 01:55:23 +00:00
|
|
|
|
|
|
|
[testenv:static-tests]
|
|
|
|
description = Static formatting and quality enforcement for the tests
|
2023-05-19 22:03:44 +00:00
|
|
|
basepython = py310
|
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
|
2022-01-05 06:40:02 +00:00
|
|
|
types-toml
|
2020-09-25 01:55:23 +00:00
|
|
|
commands =
|
2022-01-05 06:13:44 +00:00
|
|
|
pylint {toxinidir}/tests/ \
|
|
|
|
--rcfile {toxinidir}/.pylintrc
|
|
|
|
mypy {toxinidir}/tests/ \
|
|
|
|
--ignore-missing-imports \
|
|
|
|
--no-strict-optional
|
2020-09-24 00:36:11 +00:00
|
|
|
|
|
|
|
[testenv:security]
|
|
|
|
description = Security checks
|
2023-05-19 22:03:44 +00:00
|
|
|
basepython = py310
|
2020-11-12 03:34:42 +00:00
|
|
|
platform = linux
|
2021-04-17 02:33:24 +00:00
|
|
|
ignore_errors = true
|
2022-01-05 06:13:44 +00:00
|
|
|
skip_install = 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 =
|
2022-01-05 06:13:44 +00:00
|
|
|
bandit {toxinidir}/tox_poetry_installer/ \
|
|
|
|
--recursive \
|
|
|
|
--quiet
|
|
|
|
bandit {toxinidir}/tests/ \
|
|
|
|
--recursive \
|
|
|
|
--quiet \
|
|
|
|
--skip B101
|
|
|
|
poetry export \
|
|
|
|
--format requirements.txt \
|
|
|
|
--output {envtmpdir}/requirements.txt \
|
|
|
|
--without-hashes \
|
2022-10-06 19:16:17 +00:00
|
|
|
--with dev \
|
|
|
|
--extras poetry
|
2022-01-05 06:13:44 +00:00
|
|
|
safety check \
|
|
|
|
--file {envtmpdir}/requirements.txt \
|
2023-03-01 21:43:09 +00:00
|
|
|
--output text \
|
|
|
|
# https://github.com/pytest-dev/py/issues/287
|
|
|
|
--ignore 51457
|