diff options
author | Akihiro Motoki <amotoki@gmail.com> | 2021-01-07 04:26:07 +0900 |
---|---|---|
committer | Akihiro Motoki <amotoki@gmail.com> | 2021-01-07 04:26:07 +0900 |
commit | d64c25c0191fc0a0f23b4f3916e1568a4e719a84 (patch) | |
tree | b790cb325dfbc69451e360398c306e6f7918dba1 /tox.ini | |
parent | c0c6a2b3a99218f0e67a3484aac5e38968a82fdc (diff) | |
download | neutron-d64c25c0191fc0a0f23b4f3916e1568a4e719a84.tar.gz |
Follow-up: Move linters dependencies to tox.ini
After commit 89e2fad8ef856f0e3651e4ea5784d28bc9aeb229,
pep8/bandit/bashate tox envs have different dependencies than
the default tox env. If tox envs with different dependencies share
some common envdir, tox env will be recreated every time a different
tox env is specified. (For example, "tox -e cover" after "tox -e pep8"
recreates the tox env.)
To address it, this commit introduces a new common envdir for linters
(envdir = {toxworkdir}/lint). It also moves deependencies of bashate
and bandit envs to pep8 env to ensure these three tox envs have the
same dependencies.
Cleanups are also made in test-requirements and lower-constraints.
* astroid and isort can be dropped from test-requirements.txt
as pylint has proper version cappings for astroid and isort.
(These cappings are available in pylint 2.5 and later.)
* reno is a document dependency, so it is unnecessary in test-requirements.
* reno, astroid and isort are dropped from lower-constraints
as they are not installed in lower-constraints tests.
Change-Id: Iaa3168764d050875e3d08784aee2dfba809e53be
Diffstat (limited to 'tox.ini')
-rw-r--r-- | tox.ini | 17 |
1 files changed, 7 insertions, 10 deletions
@@ -94,11 +94,11 @@ deps = -r{toxinidir}/doc/requirements.txt commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html [testenv:pep8] -envdir = {toxworkdir}/shared +envdir = {toxworkdir}/lint deps = {[testenv]deps} - {[testenv:bashate]deps} - {[testenv:bandit]deps} + bashate>=0.5.1 # Apache-2.0 + bandit!=1.6.0,>=1.1.0 # Apache-2.0 flake8-import-order==0.18.1 # LGPLv3 pylint==2.5.3 # GPLv2 commands= @@ -203,20 +203,17 @@ extension = import_exceptions = neutron._i18n [testenv:bandit] -envdir = {toxworkdir}/shared +envdir = {toxworkdir}/lint +deps = {[testenv:pep8]deps} # B104: Possible binding to all interfaces # B303: prohibit list calls: md5, sha1 # B311: Standard pseudo-random generators are not suitable for security/cryptographic purpose # B604: any_other_function_with_shell_equals_true -deps = - bandit!=1.6.0,>=1.1.0 # Apache-2.0 - -r{toxinidir}/test-requirements.txt commands = bandit -r neutron -x tests -n5 -s B104,B303,B311,B604 [testenv:bashate] -envdir = {toxworkdir}/shared -deps = - bashate>=0.5.1 # Apache-2.0 +envdir = {toxworkdir}/lint +deps = {[testenv:pep8]deps} commands = bash -c "find {toxinidir} \ -not \( -type d -name .tox\* -prune \) \ -not \( -type d -name .venv\* -prune \) \ |