-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
docs: remove github-actions-cpu-cores recommendation #14421
Conversation
|
✅ Deploy Preview for jestjs ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site configuration. |
09943c5
to
0a986ff
Compare
uses: SimenB/github-actions-cpu-cores@v1 | ||
- name: run tests | ||
run: yarn jest --max-workers ${{ steps.cpu-cores.outputs.count }} | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alternatively, we could leave this and add an info
section that it's necessary beyond 29.4.0
While that API has been backported to node 18, it has not been backported to v14 or v16, both of which Jest still supports. I'm happy to tweak the docs to point that out, but I don't think we should remove it yet. |
… with Node 18 or newer
0a986ff
to
92551e8
Compare
Ah, good to know. I've updated this PR - feedback on phrasing is welcome. |
@SimenB , given what you said, is the action inaccurately configured? https://github.com/SimenB/github-actions-cpu-cores/blob/a0a2b80333e58828f914f98cfffe6d91350afa9d/action.yml#L6-L8 It appears to be running on Node 16, which doesn't have the |
It's forward compatible 😀 Runners are only available using Node 12 (deprecated) and 16: https://github.blog/changelog/2022-05-20-actions-can-now-run-in-a-node-js-16-runtime/ |
Gotcha. I guess I'm a little bit confused when this action would be useful, then. From what I can gather, as configured, it's using Testing this on a sample GitHub action, it looks like If Could you help me understand a concrete scenario where this action would be better than the default Jest behavior? |
As mentioned there though, we can probably stop doing |
Ah, OK, thanks for the explanation. I understand now why the action is helpful. I agree that using all cores on CI by default (with a major version bump) would be a nice improvement. I'll just close this for now. Thanks! |
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. |
Summary
As of Jest 29.4.0, you no longer need to use the
github-actions-cpu-cores
action to properly set--max-workers
. All that action does is useos.availableParallelism()
, which jest now does natively after #13738.Test plan
Docs only