tox-poetry-installer/tox.ini

67 lines
1.8 KiB
INI
Raw Normal View History

2020-09-23 06:17:30 +00:00
[tox]
envlist = py36, py37, py38, static, static-tests, security
2020-09-23 06:17:30 +00:00
isolated_build = true
[testenv]
description = Run the tests
require_locked_deps = true
2020-09-23 06:17:30 +00:00
deps =
pytest
pytest-cov
toml
2020-09-23 06:17:30 +00:00
commands =
pytest --cov tox_poetry_installer --cov-config {toxinidir}/.coveragerc tests/ --cov-report term-missing
[testenv:static]
description = Static formatting and quality enforcement
require_locked_deps = true
basepython = python3.8
ignore_errors = true
deps =
pylint
mypy
black
reorder-python-imports
pre-commit
commands =
black {toxinidir}/tox_poetry_installer.py
reorder-python-imports {toxinidir}/tox_poetry_installer.py
pre-commit run --all-files
pylint --rcfile {toxinidir}/.pylintrc {toxinidir}/tox_poetry_installer.py
mypy --ignore-missing-imports --no-strict-optional {toxinidir}/tox_poetry_installer.py
[testenv:static-tests]
description = Static formatting and quality enforcement for the tests
require_locked_deps = true
basepython = python3.8
ingore_errors = true
deps =
pylint
mypy
black
reorder-python-imports
allowlist_externals =
bash
commands =
black {toxinidir}/tests/
bash -c "reorder-python-imports {toxinidir}/tests/*.py --unclassifiable-application-module tox_poetry_installer"
bash -c "pylint --rcfile {toxinidir}/.pylintrc {toxinidir}/tests/*.py"
bash -c "mypy --ignore-missing-imports --no-strict-optional {toxinidir}/tests/*.py"
[testenv:security]
description = Security checks
require_locked_deps = true
basepython = python3.8
ignore_errors = true
skip_install = true
deps =
bandit
safety
poetry
allowlist_externals =
bash
commands =
bandit --quiet {toxinidir}/tox_poetry_installer.py
bash -c "bandit --quiet --skip B101 {toxinidir}/tests/*.py"
bash -c "poetry export --format requirements.txt --without-hashes --dev | safety check --stdin --bare"