Multiple matrix expansions in one job

We have tests along 3 dimensions. We don’t want to create a full matrix of those as that would result in a LOT of jobs. Is it possible to create job (steps) for multiple matrix expansions?

In the example we have as dimensions: python version, software, syntax. We want to test 2 python versions with a full combination of the matrix and 4 more python versions with only 1 software

The current result matrix looks like this:

build (2.7, Lmod-7.8.22, Lua)
build (2.7, Lmod-7.8.22, Tcl)
build (2.7, Lmod-8.2.9, Lua)
build (2.7, Lmod-8.2.9, Tcl)
build (2.7, modules-tcl-1.147, Tcl)
build (2.7, modules-3.2.10, Tcl)
build (2.7, modules-4.1.4, Tcl)

build (3.6, Lmod-7.8.22, Lua)
build (3.6, Lmod-7.8.22, Tcl)
build (3.6, Lmod-8.2.9, Lua)
build (3.6, Lmod-8.2.9, Tcl)
build (3.6, modules-tcl-1.147, Tcl)
build (3.6, modules-3.2.10, Tcl)
build (3.6, modules-4.1.4, Tcl)

build (3.5, Lmod-8.2.9, Lua)
build (3.5, Lmod-8.2.9, Tcl)

build (3.7, Lmod-8.2.9, Lua)
build (3.7, Lmod-8.2.9, Tcl)

build (3.8, Lmod-8.2.9, Lua)
build (3.8, Lmod-8.2.9, Tcl)

build (3.9, Lmod-8.2.9, Lua)
build (3.9, Lmod-8.2.9, Tcl)

This is achieved with many exclude keys. It would be way easier and less repetitive if you could define 2 matrices for this job: 1 for the full expansion and 1 for the partial one

Using YAML anchors would allow creating 2 jobs with the same steps, but for some reason they are not (yet?) supported on GHA

You can have a matrix with no keys beside include and list all configurations you want to test explicitly.
See Improve matrix exclusion feature - #6 by Simran-B for an example.