Skip to content

Add max-parallel support for matrix strategy#13

Merged
beagleknight merged 1 commit intomainfrom
support-max-parallel
Apr 1, 2026
Merged

Add max-parallel support for matrix strategy#13
beagleknight merged 1 commit intomainfrom
support-max-parallel

Conversation

@beagleknight
Copy link
Copy Markdown
Contributor

Summary

  • Adds an optional maxParallel property to the Matrix interface, which compiles to max-parallel under the strategy block in the generated GitHub Actions workflow YAML.
  • When maxParallel is not set, the output is unchanged (no max-parallel key emitted).
  • Includes a new test case verifying the feature with updated snapshots.

Usage

workflow.addJob("job1", {
  matrix: {
    elements: [
      { id: "node", options: [18, 20, 22] },
    ],
    maxParallel: 2,
  },
  steps: [{ run: "echo ${{ matrix.node }}" }],
});

Produces:

strategy:
  fail-fast: false
  max-parallel: 2
  matrix:
    node:
      - 18
      - 20
      - 22

Allow users to set maxParallel on a Matrix to control the maximum number
of concurrent jobs when using a matrix strategy. This emits the
'max-parallel' property under the 'strategy' block in the compiled
GitHub Actions workflow YAML.
@beagleknight beagleknight merged commit 2957220 into main Apr 1, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant