5757 with :
5858 node-version : ${{ matrix.node }}
5959
60- - name : Determine the number of CPU cores
61- uses : SimenB/github-actions-cpu-cores@97ba232459a8e02ff6121db9362b09661c875ab8 # v2.0.0
62- id : cpu-cores
63-
6460 - name : Run build scripts
6561 # It's not necessary to run the full build, since Jest can interpret
6662 # source files with `babel-jest`. Some packages have their own custom
@@ -69,12 +65,11 @@ jobs:
6965
7066 - name : Running the tests
7167 env :
72- MAXWORKERS : ${{ steps.cpu-cores.outputs.count }}
7368 SHARD : ${{ matrix.shard }}
7469 run : |
7570 npm run test:unit -- \
7671 --ci \
77- --maxWorkers="$MAXWORKERS " \
72+ --maxWorkers="$(nproc) " \
7873 --shard="$SHARD" \
7974 --cacheDirectory="$HOME/.jest-cache"
8075
@@ -108,20 +103,14 @@ jobs:
108103 with :
109104 node-version : ${{ matrix.node }}
110105
111- - name : Determine the number of CPU cores
112- uses : SimenB/github-actions-cpu-cores@97ba232459a8e02ff6121db9362b09661c875ab8 # v2.0.0
113- id : cpu-cores
114-
115106 - name : Run build scripts
116107 # It's not necessary to run the full build, since Jest can interpret
117108 # source files with `babel-jest`. Some packages have their own custom
118109 # build tasks, however. These must be run.
119110 run : npx lerna run build
120111
121112 - name : Run the date tests
122- env :
123- MAXWORKERS : ${{ steps.cpu-cores.outputs.count }}
124- run : npm run test:unit:date -- --ci --maxWorkers="$MAXWORKERS" --cacheDirectory="$HOME/.jest-cache"
113+ run : npm run test:unit:date -- --ci --maxWorkers="$(nproc)" --cacheDirectory="$HOME/.jest-cache"
125114
126115 compute-previous-wordpress-version :
127116 name : Compute previous WordPress version
0 commit comments