message: Use available CPU cores on CI
diff: @@ -163,8 +163,16 @@ jobs:
  if: steps.cache-node-modules.outputs.cache-hit != 'true'
  run: npm ci --no-audit
  + - name: CPU cores
  + uses: SimenB/github-actions-cpu-cores@v1
  + id: cpu-cores
  +
  - name: Test
  - run: npm test -- --coverage --maxWorkers 2 --shard ${{ matrix.shard }}
  + run: >
  + npm test --
  + --coverage
  + --maxWorkers ${{ steps.cpu-cores.outputs.count }}
  + --shard ${{ matrix.shard }}
  - name: Upload coverage to Codecov
  uses: codecov/codecov-action@v3
  @@ -203,8 +211,15 @@ jobs:
  - name: Install React 17
  run: npm run react17
  + - name: CPU cores
  + uses: SimenB/github-actions-cpu-cores@v1
  + id: cpu-cores
  +
  - name: Test
  - run: npm test -- --maxWorkers 2 --shard ${{ matrix.shard }}
  + run: >
  + npm test --
  + --maxWorkers ${{ steps.cpu-cores.outputs.count }}
  + --shard ${{ matrix.shard }}
  website:
  name: Build website
  @@ -289,9 +304,13 @@ jobs:
  path: packages/website/.next
  key: nextjs-${{ github.run_id }}
  + - name: CPU cores
  + uses: SimenB/github-actions-cpu-cores@v1
  + id: cpu-cores
  +
  - name: Test
  id: test
  - run: npm run test-chrome -- --workers 2
  + run: npm run test-chrome -- --workers ${{ steps.cpu-cores.outputs.count }}
  - uses: actions/upload-artifact@v3
  if: failure() && steps.test.outcome == 'failure'
  