Add static and security check envs to toxfile

This commit is contained in:
Ethan Paul 2020-09-23 20:36:11 -04:00
parent c9c750d5e4
commit dc826df191
No known key found for this signature in database
GPG Key ID: C5F5542B54A4D9C6

35
tox.ini
View File

@ -1,11 +1,40 @@
[tox]
envlist = py38
envlist = py36, py37, py38, static, security
isolated_build = true
[testenv]
description = Run the tests (pytest)
description = Run the tests
deps =
requests
skip_install = true
commands =
pip freeze
[testenv:static]
description = Static code quality checks and formatting enforcement
basepython = python3.7
ignore_errors = true
deps =
pylint
mypy
black
reorder-python-imports
pre-commit
commands =
black tox_poetry_installer.py
reorder-python-imports tox_poetry_installer.py
pylint tox_poetry_installer.py
mypy tox_poetry_installer.py --ignore-missing-imports --no-strict-optional
pre-commit run --all-files
[testenv:security]
description = Security checks
basepython = python3.7
ignore_errors = true
deps =
bandit
safety
allowlist_externals =
bash
commands =
bandit tox_poetry_installer.py --recursive
bash -c "poetry export --format requirements.txt --without-hashes --dev | safety check --stdin --bare"