You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
GitHub Action
CPU Core Count
v1.0.1
Uses os.cpus
to figure out how many logical cores are available on the runner.
name: Node CI
on:
push:
branches:
- main
pull_request:
branches:
- "**"
jobs:
test:
strategy:
matrix:
os: [ubuntu-latest, macOS-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Get number of CPU cores
uses: SimenB/github-actions-cpu-cores@v1
id: cpu-cores
- name: run tests
run: npx jest --max-workers ${{ steps.cpu-cores.outputs.count }}