mirror of
https://github.com/enpaul/tox-poetry-installer.git
synced 2024-12-05 01:40:44 +00:00
92 lines
2.0 KiB
INI
92 lines
2.0 KiB
INI
[tox]
|
|
envlist = py37, py38, py39, py310, py311, static, static-tests, security
|
|
skip_missing_interpreters = true
|
|
|
|
[testenv]
|
|
description = Run the tests
|
|
require_locked_deps = true
|
|
require_poetry = true
|
|
extras =
|
|
poetry
|
|
locked_deps =
|
|
pytest
|
|
pytest-cov
|
|
toml
|
|
commands =
|
|
pytest {toxinidir}/tests/ \
|
|
--cov {toxinidir}/tox_poetry_installer \
|
|
--cov-config {toxinidir}/.coveragerc \
|
|
--cov-report term-missing
|
|
|
|
[testenv:static]
|
|
description = Static formatting and quality enforcement
|
|
basepython = py3.10
|
|
platform = linux
|
|
ignore_errors = true
|
|
locked_deps =
|
|
black
|
|
blacken-docs
|
|
mdformat
|
|
mdformat-gfm
|
|
mypy
|
|
reorder-python-imports
|
|
pre-commit
|
|
pre-commit-hooks
|
|
pylint
|
|
types-toml
|
|
commands =
|
|
pre-commit run \
|
|
--all-files
|
|
pylint {toxinidir}/tox_poetry_installer/ \
|
|
--rcfile {toxinidir}/.pylintrc
|
|
mypy {toxinidir}/tox_poetry_installer/ \
|
|
--ignore-missing-imports \
|
|
--no-strict-optional
|
|
|
|
[testenv:static-tests]
|
|
description = Static formatting and quality enforcement for the tests
|
|
basepython = py3.10
|
|
platform = linux
|
|
ignore_errors = true
|
|
locked_deps =
|
|
pylint
|
|
pytest
|
|
mypy
|
|
types-toml
|
|
commands =
|
|
pylint {toxinidir}/tests/ \
|
|
--rcfile {toxinidir}/.pylintrc
|
|
mypy {toxinidir}/tests/ \
|
|
--ignore-missing-imports \
|
|
--no-strict-optional
|
|
|
|
[testenv:security]
|
|
description = Security checks
|
|
basepython = py3.10
|
|
platform = linux
|
|
ignore_errors = true
|
|
skip_install = true
|
|
locked_deps =
|
|
bandit
|
|
safety
|
|
poetry
|
|
commands =
|
|
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 \
|
|
--with dev \
|
|
--extras poetry
|
|
safety check \
|
|
--file {envtmpdir}/requirements.txt \
|
|
--output text \
|
|
# https://github.com/pytest-dev/py/issues/287
|
|
--ignore 51457
|