Skip to content

Commit 9488714

Browse files
authored
chore: run tests in parallel on GitHub Actions (#10653)
1 parent 9a07781 commit 9488714

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

.github/workflows/nodejs.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,10 @@ jobs:
8383
run: yarn
8484
- name: build
8585
run: yarn build:js
86+
- name: Get number of CPU cores
87+
id: cpu-cores
88+
uses: SimenB/github-actions-cpu-cores@v1
8689
- name: run tests
87-
run: yarn test-ci-partial
90+
run: yarn test-ci-partial:parallel --max-workers ${{ steps.cpu-cores.outputs.count }}
8891
env:
8992
CI: true

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,8 @@
9898
"publish": "yarn build-clean && yarn build && lerna publish --silent",
9999
"test-types": "yarn jest --config jest.config.types.js",
100100
"test-ci": "yarn jest-coverage --color -i --config jest.config.ci.js && yarn test-leak && node ./scripts/mapCoverage.js && codecov",
101-
"test-ci-partial": "yarn jest --color -i --config jest.config.ci.js",
101+
"test-ci-partial": "yarn test-ci-partial:parallel -i",
102+
"test-ci-partial:parallel": "yarn jest --color --config jest.config.ci.js",
102103
"test-pretty-format-perf": "node packages/pretty-format/perf/test.js",
103104
"test-leak": "yarn jest -i --detectLeaks jest-mock jest-diff jest-repl pretty-format",
104105
"test": "yarn lint && yarn jest",

0 commit comments

Comments
 (0)