At the moment one must declare inter-extension dependencies within the parameter_functions.py script of the integration-config. Since MediaWiki version 1.31 the extension.json file also allows to specify such dependencies. It would be nice to have the test environment evaluate the entry from extension.json, so the dependency doesn't need to be maintained in two different places.
[1] https://github.com/wikimedia/integration-config/blob/master/zuul/parameter_functions.py#L133
The zuul/parameter_functions.py is a centrally hardcoded list of dependencies. That doesn't make it easy to adjust.
Since 1.29 extensions can specify dependencies, so we can probably parse extension.json and recursively clone all the dependencies. https://www.mediawiki.org/wiki/Manual:Extension_registration#Requirements_(dependencies)
This feature request was inspired by @Umherirrender in T130811
See also T182472: Allow extension registration to suggest optional extension/skin or MediaWiki version