Skip to content

chore: run tests in parallel on GitHub Actions#10653

Merged
SimenB merged 4 commits intojestjs:masterfrom
SimenB:speedup-ci
Oct 20, 2020
Merged

chore: run tests in parallel on GitHub Actions#10653
SimenB merged 4 commits intojestjs:masterfrom
SimenB:speedup-ci

Conversation

@SimenB
Copy link
Copy Markdown
Member

@SimenB SimenB commented Oct 20, 2020

Summary

Faster CI is always 👍

From my testing os.cpus() is accurate on GH actions: https://github.com/SimenB/available-cpu

Jest's default implementation is to leave one core alone, though, which is why I specify it: https://github.com/facebook/jest/blob/30e802036291f4c9c9fd4feef6faba485df54dd2/packages/jest-config/src/getMaxWorkers.ts#L28

If this works out, we should document it. We could also consider not doing - 1 if is-ci returns true.

Test plan

Looking at runtime on CI.

@SimenB
Copy link
Copy Markdown
Member Author

SimenB commented Oct 20, 2020

Seems to work great. Comparing to #10650

image

While this is

image

@SimenB
Copy link
Copy Markdown
Member Author

SimenB commented Oct 20, 2020

Another advantage is that we actually run tests in parallel on CI, we have had bugs in the past just affecting parallel runs

Copy link
Copy Markdown
Contributor

@thymikee thymikee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@SimenB SimenB changed the title chore: attempt to run tests in parallel on CI chore: run tests in parallel on GitHub Actions Oct 20, 2020
@SimenB SimenB merged commit 9488714 into jestjs:master Oct 20, 2020
@SimenB SimenB deleted the speedup-ci branch October 20, 2020 09:14
@github-actions
Copy link
Copy Markdown

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants