mirror of
https://github.com/enpaul/tox-poetry-installer.git
synced 2024-10-29 19:47:00 +00:00
Ethan Paul
0c25ca965e
Add precommit hook for checking for merge conflicts Add dev dep for blacken-docs Add dev dep for pre-commit-hooks Update all precommit hooks to use system language Update toxfile to use new dev deps Fix tox vs. precommit conflicts with reorder-python-imports
62 lines
1.6 KiB
INI
62 lines
1.6 KiB
INI
[tox]
|
|
envlist = py36, py37, py38, static, static-tests, security
|
|
isolated_build = true
|
|
|
|
[testenv]
|
|
description = Run the tests
|
|
require_locked_deps = true
|
|
locked_deps =
|
|
pytest
|
|
pytest-cov
|
|
toml
|
|
commands =
|
|
pytest --cov {envsitepackagesdir}/tox_poetry_installer --cov-config {toxinidir}/.coveragerc --cov-report term-missing tests/
|
|
|
|
[testenv:static]
|
|
description = Static formatting and quality enforcement
|
|
basepython = python3.8
|
|
platform = linux
|
|
ignore_errors = true
|
|
require_locked_deps = true
|
|
locked_deps =
|
|
pre-commit
|
|
pre-commit-hooks
|
|
black
|
|
blacken-docs
|
|
reorder-python-imports
|
|
pylint
|
|
mypy
|
|
commands =
|
|
pre-commit run --all-files
|
|
pylint --rcfile {toxinidir}/.pylintrc {toxinidir}/tox_poetry_installer/
|
|
mypy --ignore-missing-imports --no-strict-optional {toxinidir}/tox_poetry_installer/
|
|
|
|
[testenv:static-tests]
|
|
description = Static formatting and quality enforcement for the tests
|
|
basepython = python3.8
|
|
platform = linux
|
|
ingore_errors = true
|
|
require_locked_deps = true
|
|
locked_deps =
|
|
pylint
|
|
mypy
|
|
commands =
|
|
pylint --rcfile {toxinidir}/.pylintrc {toxinidir}/tests/
|
|
mypy --ignore-missing-imports --no-strict-optional {toxinidir}/tests/
|
|
|
|
[testenv:security]
|
|
description = Security checks
|
|
basepython = python3.8
|
|
platform = linux
|
|
ingore_errors = true
|
|
require_locked_deps = true
|
|
locked_deps =
|
|
bandit
|
|
safety
|
|
poetry
|
|
commands =
|
|
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
|