SIGN IN SIGN UP
facebook / react UNCLAIMED

The library for web and native user interfaces.

244272 0 0 JavaScript

[ci] Improve parallelism of yarn test

This PR adds parallelism similar to our existing circleci setup for
running yarn tests with the various test params. It does this by
sharding tests into `$SHARD_COUNT` number of groups, then spawning a job
for each of them and using jest's built in `--shard` option.

Effectively this means that the job will spawn an additional (where `n`
is the number of test params)

`n * $SHARD_COUNT` number of jobs to run tests in parallel

for a total of `n + (n * $SHARD_COUNT)` jobs. This does mean the
GitHub UI at the bottom of each PR gets longer and unfortunately it's
not sorted in any way as far as I can tell. But if something goes wrong
it should still be easy to find out what the problem is.

The PR also changes the `ci` argument for jest-cli to be an enum instead
so the tests use all available workers in GitHub actions. This will have
to live around for a bit until we can fully migrate off of circleci.

ghstack-source-id: 08f2d16353aeca7cd15655d5ce2b7963a12507a7
Pull Request resolved: https://github.com/facebook/react/pull/30033
L
Lauren Tan committed
85215413cbfd5f28a4448b0d649b9198458e00e8
Parent: 28c1336