Skip to content
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

CI: Further Parallelize Execution Of Jest Tests #4324

Merged
merged 16 commits into from
Oct 15, 2024

Conversation

adrians5j
Copy link
Member

@adrians5j adrians5j commented Oct 9, 2024

Changes

With this PR, we are further parallelizing execution of Jest tests, using Jest's sharding feature. Packages api-headless-cms and api-page-builder will now be executed across 6 parallel processes.

These changes are applied to PR (pullRequests.yml) and push workflows (pushDev.yml, pushNext.yml).

Note

I'm not yet sure if 6 is the optimal number when it comes to the number of shards. What I saw in tests is that, with this number set to 10, ES-related tests would fail more often. Probably because ES would get overloaded during the execution of tests. We'll be monitoring logs a bit in the following days and see how things behave.

Results

With the above mentioned changes, the PR workflow duration was reduced from 30-40min to 15min-25min.

Additional Changes

I've removed Publish to Verdaccio and create-webiny-project jobs from the PR workflow, because:

  1. they increase PR workflow's duration while not bringing that much value
  2. they don't bring much value these are run within "push" workflows anyway (we deploy a Webiny instance and run E2E tests there)

image

How Has This Been Tested?

CI.

Documentation

N/A

@adrians5j adrians5j changed the base branch from next to dev October 9, 2024 11:38
@adrians5j adrians5j marked this pull request as ready for review October 14, 2024 19:49
@adrians5j adrians5j changed the title Adrian/ci jest cms shards Further Parallelize Jest Tests With Sharding Oct 14, 2024
@adrians5j adrians5j changed the title Further Parallelize Jest Tests With Sharding CI: Further Parallelize Jest Tests With Sharding Oct 14, 2024
@adrians5j adrians5j changed the title CI: Further Parallelize Jest Tests With Sharding CI: Further Parallelize Execution Of Jest Tests Oct 14, 2024
@brunozoric brunozoric self-requested a review October 15, 2024 09:51
@adrians5j adrians5j merged commit cc419c1 into dev Oct 15, 2024
119 of 120 checks passed
@adrians5j adrians5j deleted the adrian/ci-jest-cms-shards branch November 12, 2024 09:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants