Interview Prep/GitHub Actions/Jobs, Steps, Matrix & Concurrency

How does a matrix expand, and how are job names generated?

BeginnerConceptJobs, Steps, Matrix & Concurrency
Answer

Every combination of the matrix variables becomes one job (Cartesian product), named jobid (v1, v2) unless you set name.

strategy:
  matrix:
    os: [ubuntu-24.04, windows-2025]
    node: [20, 22, 24]
runs-on: ${{ matrix.os }}
name: test (${{ matrix.os }}, node ${{ matrix.node }})

That is 6 jobs. A run can generate at most 256 matrix jobs per matrix. Matrix job names are what branch protection sees, so renaming a matrix value renames the required check.

All GitHub Actions questions Roadmap: GitHub Actions

More on Jobs, Steps, Matrix & Concurrency