What are the `strategy` context values and when are they useful?
AdvancedConceptContexts, Expressions, Env & Outputs
Answer
strategy.job-index (0-based), strategy.job-total, strategy.fail-fast, strategy.max-parallel. Index and total enable test sharding without a matrix of shard numbers:
strategy:
matrix:
shard: [1, 2, 3, 4]
steps:
- run: npx playwright test --shard=${{ matrix.shard }}/${{ strategy.job-total }}
More on Contexts, Expressions, Env & Outputs
List the available contexts and what each holds.BeginnerWhich contexts can you use in which keys? Give two examples that trip people up.AdvancedWhat are the expression operators and how do comparisons coerce types?IntermediateHow do you write a ternary in GitHub Actions expressions?IntermediateWhat do `contains`, `startsWith`, `endsWith`, `format` and `join` do?BeginnerWhat are object filters (`.*`) and how are they useful?Intermediate