Execute all environments in tox

36 views Asked by At

I have an envlist defined in the [tox] section: [tox] envlist = cpySrc, py27-{AirSuspensionWakeup,AuxiliaryLightsControl}, py37-merge

The issue is that in the ContinousIntegration they are expecting the execution of only one environment and there is no option to change it: tox -e test Is there any way to execute all my envlist even when command line option -e is specified? Thanks

I can execute locally without "-e" but when I move it to the CI, tox is called specifying an environment.

1

There are 1 answers

0
N1ngu On

At the end, the problems are:

  1. A CI system tailored to a very opinionated use of a particular tooling.
  2. You not having a chance to leverage changes in the CI system.

Those smell like crappy workflow decisions, not a technical problem. Those are what you really need to solve.


You can add an additional testenv:test that will trigger the others like

[tox]
envlist = test,aaa,bbb

[testenv:test]
deps = tox
commands = tox -e aaa,bbb

[testenv:aaa]
commands = python -c 'print("aaa")'

[testenv:bbb]
commands = python -c 'print("bbb")'

But then again you may have a lot of trouble with different interpreter discoverability because tox -e aaa,bbb will already run in an isolated tox environment. So, good luck hacking that.