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

All jobs, matrices and conditions commands · GitHub Actions 1 cheatsheet

Was this page helpful?