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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: run tests in parallel on GitHub Actions #10653

Merged
merged 4 commits into from Oct 20, 2020
Merged

Conversation

SimenB
Copy link
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
Member Author

SimenB commented Oct 20, 2020

Seems to work great. Comparing to #10650

image

While this is

image

@SimenB
Copy link
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
Collaborator

@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

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.

None yet

3 participants