strategy.matrix defines os: [ubuntu-latest, windows-latest] and node: [18, 20]. You need to drop only windows-latest + node 18, and add one extra job ubuntu-latest + node 22. Which keys accomplish this?
Select an answer to reveal the explanation.
Short Explanation and Infographic
exclude removes specific cartesian products; include adds (or expands) combinations. Use both when pruning one cell and adding another version.
Full explanation below image
Full Explanation
A matrix builds the cartesian product of its axes. 'exclude' removes listed combinations. 'include' adds combinations—and can also expand existing ones with extra variables when matching keys are present. It does not delete combinations. fail-fast and max-parallel control execution behavior and concurrency, not which cells exist. runs-on selects runners for each job; it is not a substitute for matrix set algebra. Correct pattern: exclude: [{ os: windows-latest, node: 18 }] and include: [{ os: ubuntu-latest, node: 22 }].