We have 2 test suites: A and B. A runs on any branch (including master), B runs only on master. The jobs are nearly identical. Trying to achieve something like this:
- If branch not “master” - run with “parallelism: 1” and test suiteA
- If branch is “master” - run with “parallelism: 2”, test suiteA on container 0, test suiteB in container 1
I can write separate jobs for A and B with “when” condition, but it’s a lot of duplicated code in config.yml, looking for more elegant solution.
Alternatively - I could run with “parallelism: 2” on every branch, and write our own shell file that will be called, and in the shell file do the branch/container number logic… also not very elegant…