A matrix of PHP versions crossed with dependency strategies, producing seven jobs, six of which tested a combination nobody runs.
# before
strategy:
matrix:
php: ['8.1', '8.2', '8.3']
deps: [lowest, locked, highest]
# 9 jobs, 12 minutes of runner time each
# after
strategy:
matrix:
include:
- { php: '8.2', deps: lowest } # the floor
- { php: '8.3', deps: locked } # what we deploy
- { php: '8.3', deps: highest } # the ceiling
# 3 jobs
A full cross product tests combinations that no deployment will ever have, and the cost is not only runner minutes — it is that nine red squares from one failure make the actual cause harder to find. Naming the three combinations that correspond to something real is more work to write and considerably less work to read when it breaks.