-
Notifications
You must be signed in to change notification settings - Fork 48.9k
[ci] Improve parallelism of yarn test #30033
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
This was referenced Jun 21, 2024
Comparing: 454fb35...e4b9888 Critical size changesIncludes critical production bundles, as well as any change greater than 2%:
Significant size changesIncludes any change greater than 0.2%: Expand to show
|
This was referenced Jun 21, 2024
Merged
poteto
added a commit
that referenced
this pull request
Jun 22, 2024
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: 08f2d16 Pull Request resolved: #30033
This was referenced Jul 25, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Stack from ghstack (oldest at bottom):
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 jobfor 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 parallelfor a total of
n + (n * $SHARD_COUNT)
jobs. This does mean theGitHub 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 insteadso 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.