DevOps / Scripts yaml Intermediate

GitHub Actions Matrix Build

Run tests across multiple Node versions and OS combinations with a matrix strategy.

yaml
name: Matrix CI
on: [push]
jobs:
  test:
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os: [ubuntu-latest, macos-latest]
        node: [18, 20, 22]
      fail-fast: false
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with: { node-version: "${{ matrix.node }}" }
      - run: npm ci && npm test

Prerequisites

  • GitHub repository
  • Node.js test suite

Pro Tips

  • → Set fail-fast: false to see all failures across the matrix.

Was this module useful?

Share your experience — it helps the team improve.

Leave Feedback

Commercial Licensing

Acquire a production access token or template license for enterprise deployment.

Module Info

Language
yaml
Level
Intermediate
Read time
3 min
Published
Jun 2026
License
Commercial License

Newsletter

New modules every week, directly to your inbox.