From 087db95c43735479a0133e27ccdf61e2d1fb9ad5 Mon Sep 17 00:00:00 2001 From: Ethan Paul <24588726+enpaul@users.noreply.github.com> Date: Wed, 5 Jan 2022 01:13:44 -0500 Subject: [PATCH] Update toxfile Wrap long lines to improve readability Update safety command to use --json flag instead of --bare flag Update security env to skip package install --- tox.ini | 42 ++++++++++++++++++++++++++++++++---------- 1 file changed, 32 insertions(+), 10 deletions(-) diff --git a/tox.ini b/tox.ini index b594c27..96ea893 100644 --- a/tox.ini +++ b/tox.ini @@ -14,7 +14,10 @@ locked_deps = pytest-cov toml commands = - pytest --cov {toxinidir}/tox_poetry_installer --cov-config {toxinidir}/.coveragerc --cov-report term-missing {toxinidir}/tests/ + pytest {toxinidir}/tests/ \ + --cov {toxinidir}/tox_poetry_installer \ + --cov-config {toxinidir}/.coveragerc \ + --cov-report term-missing [testenv:static] description = Static formatting and quality enforcement @@ -32,9 +35,13 @@ locked_deps = pre-commit-hooks pylint 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/ + 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 @@ -46,20 +53,35 @@ locked_deps = pytest mypy commands = - pylint --rcfile {toxinidir}/.pylintrc {toxinidir}/tests/ - mypy --ignore-missing-imports --no-strict-optional {toxinidir}/tests/ + pylint {toxinidir}/tests/ \ + --rcfile {toxinidir}/.pylintrc + mypy {toxinidir}/tests/ \ + --ignore-missing-imports \ + --no-strict-optional [testenv:security] description = Security checks basepython = python3.8 platform = linux ignore_errors = true +skip_install = 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 + 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 \ + --dev + safety check \ + --file {envtmpdir}/requirements.txt \ + --json