summaryrefslogtreecommitdiff
path: root/tox.ini
diff options
context:
space:
mode:
authorBrett Holman <bholman.devel@gmail.com>2022-01-31 14:39:45 -0700
committerGitHub <noreply@github.com>2022-01-31 15:39:45 -0600
commit96dca24bf58b0d2f8adcd83f54ca073092d68739 (patch)
tree6295fa9aeec586729904bf1b7ba57b6a8e7691bc /tox.ini
parent902aa44e6f4d267b5a7a59abb463f7b22c8d14d8 (diff)
downloadvyos-cloud-init-96dca24bf58b0d2f8adcd83f54ca073092d68739.tar.gz
vyos-cloud-init-96dca24bf58b0d2f8adcd83f54ca073092d68739.zip
fix parallel tox execution (#1214)
Diffstat (limited to 'tox.ini')
-rw-r--r--tox.ini53
1 files changed, 33 insertions, 20 deletions
diff --git a/tox.ini b/tox.ini
index 52849557..5037fa69 100644
--- a/tox.ini
+++ b/tox.ini
@@ -9,39 +9,52 @@ setenv =
passenv=
PYTEST_ADDOPTS
-[flake_env]
-envdir = {toxworkdir}/.flake_env
-deps =
- flake8==3.9.2
- pylint==2.11.1
- black==21.12b0
- isort==5.10.1
- -r{toxinidir}/test-requirements.txt
- -r{toxinidir}/integration-requirements.txt
+[format_deps]
+flake8==3.9.2
+pylint==2.11.1
+black==21.12b0
+isort==5.10.1
[testenv:flake8]
-envdir = {[flake_env]envdir}
-deps = {[flake_env]deps}
+deps =
+ flake8=={[format_deps]flake8}
commands = {envpython} -m flake8 {posargs:cloudinit/ tests/ tools/ setup.py}
[testenv:pylint]
-envdir = {[flake_env]envdir}
-deps = {[flake_env]deps}
+deps =
+ pylint=={[format_deps]pylint}
+ -r{toxinidir}/test-requirements.txt
+ -r{toxinidir}/integration-requirements.txt
commands = {envpython} -m pylint {posargs:cloudinit tests tools}
[testenv:black]
-envdir = {[flake_env]envdir}
-deps = {[flake_env]deps}
+deps =
+ black=={[format_deps]black}
commands = {envpython} -m black . --check
[testenv:isort]
-envdir = {[flake_env]envdir}
-deps = {[flake_env]deps}
+deps =
+ isort=={[format_deps]isort}
commands = {envpython} -m isort . --check-only
-[testenv:format]
-envdir = {[flake_env]envdir}
-deps = {[flake_env]deps}
+[testenv:check_format]
+deps =
+ flake8=={[format_deps]flake8}
+ pylint=={[format_deps]pylint}
+ black=={[format_deps]black}
+ isort=={[format_deps]isort}
+ -r{toxinidir}/test-requirements.txt
+ -r{toxinidir}/integration-requirements.txt
+commands =
+ {[testenv:black]commands}
+ {[testenv:isort]commands}
+ {[testenv:flake8]commands}
+ {[testenv:pylint]commands}
+
+[testenv:do_format]
+deps =
+ black=={[format_deps]black}
+ isort=={[format_deps]isort}
commands =
{envpython} -m isort .
{envpython} -m black .