2020-09-23 06:17:30 +00:00
|
|
|
[tox]
|
2020-09-25 01:55:23 +00:00
|
|
|
envlist = py36, py37, py38, static, static-tests, security
|
2020-09-23 06:17:30 +00:00
|
|
|
isolated_build = true
|
|
|
|
|
|
|
|
[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
|
2020-09-23 06:17:30 +00:00
|
|
|
deps =
|
2020-09-25 01:55:23 +00:00
|
|
|
pytest
|
|
|
|
pytest-cov
|
|
|
|
toml
|
2020-09-23 06:17:30 +00:00
|
|
|
commands =
|
2020-09-25 01:55:23 +00:00
|
|
|
pytest --cov tox_poetry_installer --cov-config {toxinidir}/.coveragerc tests/ --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
|
2020-09-26 14:45:47 +00:00
|
|
|
require_locked_deps = true
|
2020-09-25 01:55:23 +00:00
|
|
|
basepython = python3.8
|
2020-09-24 00:36:11 +00:00
|
|
|
ignore_errors = true
|
|
|
|
deps =
|
|
|
|
pylint
|
|
|
|
mypy
|
|
|
|
black
|
|
|
|
reorder-python-imports
|
|
|
|
pre-commit
|
|
|
|
commands =
|
2020-09-25 01:55:23 +00:00
|
|
|
black {toxinidir}/tox_poetry_installer.py
|
|
|
|
reorder-python-imports {toxinidir}/tox_poetry_installer.py
|
2020-09-24 00:36:11 +00:00
|
|
|
pre-commit run --all-files
|
2020-09-25 01:55:23 +00:00
|
|
|
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
|
2020-09-26 14:45:47 +00:00
|
|
|
require_locked_deps = true
|
2020-09-25 01:55:23 +00:00
|
|
|
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"
|
|
|
|
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-26 14:45:47 +00:00
|
|
|
require_locked_deps = true
|
2020-09-25 01:55:23 +00:00
|
|
|
basepython = python3.8
|
2020-09-24 00:36:11 +00:00
|
|
|
ignore_errors = true
|
2020-09-25 01:55:23 +00:00
|
|
|
skip_install = true
|
2020-09-24 00:36:11 +00:00
|
|
|
deps =
|
|
|
|
bandit
|
|
|
|
safety
|
2020-09-25 01:55:23 +00:00
|
|
|
poetry
|
2020-09-24 00:36:11 +00:00
|
|
|
allowlist_externals =
|
|
|
|
bash
|
|
|
|
commands =
|
2020-09-25 05:03:31 +00:00
|
|
|
bandit --quiet {toxinidir}/tox_poetry_installer.py
|
|
|
|
bash -c "bandit --quiet --skip B101 {toxinidir}/tests/*.py"
|
2020-09-24 00:36:11 +00:00
|
|
|
bash -c "poetry export --format requirements.txt --without-hashes --dev | safety check --stdin --bare"
|