In a matrix strategy, what does the 'include:' key do when it matches an existing combination?
Select an answer to reveal the explanation.
Short Explanation and Infographic
include: is the variable injector — it finds matching matrix combos and enriches them with extra key-value pairs, or creates new combos if nothing matches.
Full explanation below image
Full Explanation
The 'strategy.matrix.include:' key works two ways: (1) If the include entry matches an existing matrix combination (by all its keys), it adds the extra variables in the include entry to that combination; (2) If the include entry doesn't match any existing combination, it creates a new standalone combination. This allows adding combination-specific metadata: e.g., add 'experimental: true' to specific os/version combinations, or add a special build flag only for the windows+node18 combo. It never duplicates or replaces existing combinations — it only augments or appends.