GitHub Actions "matrix must define at least one vector"
By Daniel Zoghalchali·Latchkey
A matrix needs at least one keyed list of values (a vector) to expand into jobs. Declaring only include/exclude, or an empty matrix, gives nothing to expand and is rejected.
What this error means
The workflow fails to start with "matrix must define at least one vector", typically when the matrix has only an include array or an empty mapping.
github-actions
Error: matrix must define at least one vector
Common causes
Only include/exclude, no base vector
The matrix provides include: rows but no base dimension list, so there is no vector to expand and augment.
Vector resolved to empty
A matrix key built from fromJSON resolved to an empty array, leaving no values to expand.
How to fix it
Provide at least one non-empty vector
Add a base dimension (e.g. os: [...] or node: [...]).
Ensure fromJSON-sourced vectors are non-empty arrays.
Use include only to augment an existing vector, not as the sole content.