Skip to content

How to define environment that can't be run in parallel #2411

Answered by jugmac00
GlenNicholls asked this question in Q&A
Discussion options

You must be logged in to vote

You can actually use depends which is more a runs_after than really a depends :-)

I just verified this with the following tox configuration:

[tox]
envlist =
    py36,
    py37,
    py38,
    py39,
    py310,
    lint,

[testenv]
extras = test
commands = pytest {posargs}

[testenv:lint]
depends = py36,py37,py38,py39,py310
deps = pre-commit
commands = pre-commit run --all-files --show-diff-on-failure

And actually all envs ran in parallel, only then pre-commit, and I got the following output:

❯ tox -p
GLOB sdist-make: /home/jugmac00/Projects/flask-reuploaded/setup.py
✔ OK py36 in 15.53 seconds
✔ OK py310 in 20.509 seconds
✔ OK py37 in 20.538 seconds
✔ OK py38 in 20.613 seconds
✔ OK py39 in …

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@GlenNicholls
Comment options

Answer selected by GlenNicholls
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants