GitHub Actions 1 · Jobs, matrices and conditions
Test across versions
Run the same job once per Node.js version and operating system.
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
node: [22, 24]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
Official GitHub Actions 1 documentation
More jobs, matrices and conditions commands
- Run jobs in order
- Run a step conditionally
- Run a step after a failure
- Cancel outdated runs
- Start a database for tests
- Pass data between jobs
All jobs, matrices and conditions commands · GitHub Actions 1 cheatsheet