Package: tox-delay
tox-delay - run some Tox tests after others have completedThetox-delaytool postpones the run of the specified Tox environments
after the run of all the others has completed successfully. This may be
useful if e.g. there are unit or functional test environments, which
it would make no sense to run if the static checkers (pylint, mypy, etc)
find problems.Using tox-delayThe mandatory-e envlistparameter totox-delayspecifies
the comma-separated list of environment names to delay. The tool runs Tox,
instructing it to skip these specific environments, and if the run is
successful,tox-delaythen runs Tox again only for the specified ones.For example, if atox.inifile declares theblack,pep8,mypy,pylint,unit-tests, andfunctionalenvironments, the following
invocation:tox-delay -e unit-tests,functional...would result in Tox running theblack,pep8,mypy, andpylintenvironments and, if this is successful, a second Tox run forunit-testsandfunctional.Any positional arguments totox-delayare passed along to Tox for both
runs. This allows both specifying more Tox options (--workdir,--skip-missing-interpreters, etc) and specifying more positional
arguments to be expanded using the{posargs}setting intox.ini.
Thus, the-k allarguments in the following invocation will be used as{posargs}, maybe forpytestor something similar:tox-delay -e unit-tests,functional -- --workdir /tmp/tox -- -k allThe-pcommand-line option, along with its argument, is passed on to Tox
only for the first run. Thus, the following invocation would run
theblack,pep8,mypy, andpylintenvironments in parallel and
then run theunit-testsandfunctionalones sequentially:tox-delay -p all -e unit-tests,functionalIf the second run should also be done in parallel, this may be achieved by
passing-p allonce again, but this time in the "general Tox options"
section as described above:tox-delay -p all -e unit-tests,functional -- -p allQuerying the command-line tool for supported featuresAll thetox-delayimplementations support the--featurescommand-line
option to output a single line of text in a format that can be parsed
usingthefeature-checktool.Program version (tox-delay)The version advertised for this feature is thetox-delayprogram's
version number, the same as in the--versionoutput.Ignore some Tox environments (ignore)The only version advertised so far is1.0: support the-i envlist(or, if thelongoptsfeature is at version1.0or above, also--ignore envlist) command-line option to specify a comma-separated
list of environment name substrings. Any Tox environments with names
that match the values on this list will not be invoked at any stage.Long options support (longopts)0.1: limited support for long command-line options, only--help,--version, and--featuresare recognized1.0: other long options are also recognized, depending on
the version of thetox-delaytool (reported via thetox-delayfeature's version):0.1.2or higher:--ignore envlist,--parallel envlistRun first-stage test environments in parallel (parallel)The only version advertised so far is1.0: support the-p envlist(or, if thelongoptsfeature is at version1.0or above, also--parallel envlist) command-line option to specify a comma-separated
list of environment name substrings or the special value "all".
This option will be passed to Tox in the first stage, so that some
(or all) of the validation checks (in the standard use case oftox-delay)
will be run in parallel.ContactFor comments and suggestions, please contactPeter Pentchev.