HomeSoftware Heritage

templates/cypress: Run tests in parallel using sorry-cypress

This commit no longer exists in the repository. It may have been part of a branch which was deleted.

Description

templates/cypress: Run tests in parallel using sorry-cypress

In order to gain some time when executing Jenkins jobs for swh-web,
execute cypress tests in parallel using 4 runners thanks to the
sorry-cypress tool.

To do so, we use the docker features of Jenkins pipeline.
One sidecar container is created to execute the sorry-cypress server
and parallel tests are executed in another container spawning 4
cypress processes. The communication between the two containers
is done through a dedicated docker network.

Regarding code coverage, we now need to merge the outputs produced
by the 4 runners before generating reports.

This change brings a 2x speedup on overall swh-web build jobs execution
(when a single job is executed, speedup is lesser when multiple jobs
are executed in parallel but still significative).

Also restrict the maximum number of concurrent builds per job to 3
in order to avoid executing too many cypress processes at the same
time as they consume quite a lot of resources on the Jenkins node.

Related to T3423

Details

Provenance
anlambertAuthored on Aug 26 2022, 2:29 PM
anlambertPushed on Sep 5 2022, 2:45 PM
Differential Revision
D8328: templates/cypress: Run tests in parallel using sorry-cypress
Tasks
T3423: Execute cypress tests in parallel on Jenkins

Commit No Longer Exists

This commit no longer exists in the repository.