Skip to content

Commit

Permalink
docs: remove github-actions-cpu-cores rec
Browse files Browse the repository at this point in the history
As of Jest 29.4.0, you no longer need to use the `github-actions-cpu-cores` action to properly set `--max-workers`. This logic was integrated into Jest via #13738
  • Loading branch information
blimmer committed Aug 16, 2023
1 parent a5cdc86 commit 0a986ff
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@

### Chore & Maintenance

- `[docs]` Remove `github-actions-cpu-cores` recommendation ([#14421](https://github.com/jestjs/jest/pull/14421))

### Performance

## 29.6.2
Expand Down
10 changes: 0 additions & 10 deletions docs/Troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,16 +185,6 @@ jest --maxWorkers=4
npm test -- --maxWorkers=4
```

If you use GitHub Actions, you can use [`github-actions-cpu-cores`](https://github.com/SimenB/github-actions-cpu-cores) to detect number of CPUs, and pass that to Jest.

```yaml
- name: Get number of CPU cores
id: cpu-cores
uses: SimenB/github-actions-cpu-cores@v1
- name: run tests
run: yarn jest --max-workers ${{ steps.cpu-cores.outputs.count }}
```

Another thing you can do is use the [`shard`](CLI.md#--shard) flag to parallelize the test run across multiple machines.

## `coveragePathIgnorePatterns` seems to not have any effect.
Expand Down

0 comments on commit 0a986ff

Please sign in to comment.