Skip to content

Commit e74888c

Browse files
fi3eworkclaude
andcommitted
feat(ci): support suite ref override in rspack execute-all matrix
Re-introduce --suite-${suiteRefType} ${suiteRef} pass-through in the execute-all matrix of rspack from-pr / from-commit / selected workflows so users can manually trigger an all-suite run against a specific suite branch / tag / commit. This was the original intent of 15584a4 but the unconditional flag broke cac arg parsing under the default precoded / '-' placeholder values, causing every matrix shard to fall back to running all suites. Guard the flag behind a bash conditional that only emits it when suiteRefType is not 'precoded', so the default PR-comment trigger path keeps producing a clean command line. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 402b2da commit e74888c

File tree

3 files changed

+42
-26
lines changed

3 files changed

+42
-26
lines changed

.github/workflows/rspack-ecosystem-ci-from-commit.yml

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -218,17 +218,25 @@ jobs:
218218
publish --no-git-checks --provenance=false --access public --registry=http://localhost:4873
219219
- name: Run suite (with Verdaccio)
220220
if: matrix.suite != '_selftest'
221-
run: >-
222-
NPM_CONFIG_REGISTRY=http://localhost:4873
223-
pnpm tsx ecosystem-ci.ts
224-
run-suites
225-
--stack rspack
226-
--release "$(node -p "require('./workspace/rspack/packages/rspack/package.json').version")"
227-
${{ matrix.suite }}
221+
run: |
222+
suite_ref_args=()
223+
if [ "${{ inputs.suiteRefType }}" != "precoded" ]; then
224+
suite_ref_args=(--suite-${{ inputs.suiteRefType }} "${{ inputs.suiteRef }}")
225+
fi
226+
NPM_CONFIG_REGISTRY=http://localhost:4873 \
227+
pnpm tsx ecosystem-ci.ts run-suites \
228+
--stack rspack \
229+
--release "$(node -p "require('./workspace/rspack/packages/rspack/package.json').version")" \
230+
"${suite_ref_args[@]}" \
231+
${{ matrix.suite }}
228232
- name: Run suite (selftest)
229233
if: matrix.suite == '_selftest'
230-
run: >-
231-
pnpm tsx ecosystem-ci.ts
232-
run-suites
233-
--stack rspack
234-
${{ matrix.suite }}
234+
run: |
235+
suite_ref_args=()
236+
if [ "${{ inputs.suiteRefType }}" != "precoded" ]; then
237+
suite_ref_args=(--suite-${{ inputs.suiteRefType }} "${{ inputs.suiteRef }}")
238+
fi
239+
pnpm tsx ecosystem-ci.ts run-suites \
240+
--stack rspack \
241+
"${suite_ref_args[@]}" \
242+
${{ matrix.suite }}

.github/workflows/rspack-ecosystem-ci-from-pr.yml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -169,10 +169,14 @@ jobs:
169169
pnpm -r --filter "@rspack/binding*..." --filter "@rspack/core..." --filter "@rspack/test-tools..." \
170170
publish --no-git-checks --provenance=false --access public --registry=http://localhost:4873
171171
- name: Run suite
172-
run: >-
173-
NPM_CONFIG_REGISTRY=http://localhost:4873
174-
pnpm tsx ecosystem-ci.ts
175-
run-suites
176-
--stack rspack
177-
--release "$(node -p "require('./workspace/rspack/packages/rspack/package.json').version")"
178-
${{ matrix.suite }}
172+
run: |
173+
suite_ref_args=()
174+
if [ "${{ inputs.suiteRefType }}" != "precoded" ]; then
175+
suite_ref_args=(--suite-${{ inputs.suiteRefType }} "${{ inputs.suiteRef }}")
176+
fi
177+
NPM_CONFIG_REGISTRY=http://localhost:4873 \
178+
pnpm tsx ecosystem-ci.ts run-suites \
179+
--stack rspack \
180+
--release "$(node -p "require('./workspace/rspack/packages/rspack/package.json').version")" \
181+
"${suite_ref_args[@]}" \
182+
${{ matrix.suite }}

.github/workflows/rspack-ecosystem-ci-selected.yml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -172,10 +172,14 @@ jobs:
172172
pnpm -r --filter "@rspack/binding*..." --filter "@rspack/core..." --filter "@rspack/test-tools..." \
173173
publish --no-git-checks --provenance=false --access public --registry=http://localhost:4873
174174
- name: Run suite
175-
run: >-
176-
NPM_CONFIG_REGISTRY=http://localhost:4873
177-
pnpm tsx ecosystem-ci.ts
178-
run-suites
179-
--stack rspack
180-
--release "$(node -p "require('./workspace/rspack/packages/rspack/package.json').version")"
181-
${{ matrix.suite }}
175+
run: |
176+
suite_ref_args=()
177+
if [ "${{ inputs.suiteRefType }}" != "precoded" ]; then
178+
suite_ref_args=(--suite-${{ inputs.suiteRefType }} "${{ inputs.suiteRef }}")
179+
fi
180+
NPM_CONFIG_REGISTRY=http://localhost:4873 \
181+
pnpm tsx ecosystem-ci.ts run-suites \
182+
--stack rspack \
183+
--release "$(node -p "require('./workspace/rspack/packages/rspack/package.json').version")" \
184+
"${suite_ref_args[@]}" \
185+
${{ matrix.suite }}

0 commit comments

Comments
 (0)