diff --git a/.github/workflows/validation-no-codeql.yml b/.github/workflows/validation-no-codeql.yml index d5fed90..775af29 100644 --- a/.github/workflows/validation-no-codeql.yml +++ b/.github/workflows/validation-no-codeql.yml @@ -75,6 +75,16 @@ on: required: false type: string default: task-result + e2e-shard-list: + description: Comma-separated E2E shard indices passed to the test lane's matrix, e.g. "1,2". + required: false + type: string + default: '1' + e2e-total-shards: + description: Total E2E shard count passed to the repository script as E2E_TOTAL_SHARDS. + required: false + type: string + default: '1' secrets: TURBO_TOKEN: required: false @@ -119,6 +129,8 @@ jobs: # smoke, and performance lanes stay in the audit and scheduled lanes. unit-only: ${{ inputs.mode == 'fast' || inputs.mode == 'release' }} artifact-prefix: ${{ inputs.artifact-prefix }} + e2e-shard-list: ${{ inputs.e2e-shard-list }} + e2e-total-shards: ${{ inputs.e2e-total-shards }} secrets: TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} diff --git a/test/task-receipt-artifacts.test.mjs b/test/task-receipt-artifacts.test.mjs index 1b5e8f2..a45fbcd 100644 --- a/test/task-receipt-artifacts.test.mjs +++ b/test/task-receipt-artifacts.test.mjs @@ -147,3 +147,18 @@ test('actual optional discovery writes an explicit skip receipt at the exact upl assert.equal(report.task, 'e2e') assert.deepEqual(report.commands, []) }) + +test('validation orchestrators declare and forward the e2e shard inputs', () => { + for (const file of ['validation.yml', 'validation-no-codeql.yml']) { + const source = readFileSync(join(root, '.github/workflows', file), 'utf8') + for (const name of ['e2e-shard-list', 'e2e-total-shards']) { + assert.match( + source, + new RegExp(`^ ${name}:\\n(?:[^\\n]*\\n){3} default: '1'`, 'm'), + `${file} must declare ${name}: rendered callers always pass it, and an undeclared reusable input fails the call at startup` + ) + const testBlock = source.split('\n test:\n')[1].split(/\n [a-z0-9-]+:\n/)[0] + assert.match(testBlock, new RegExp(`${name}: \\$\\{\\{ inputs\\.${name} \\}\\}`)) + } + } +})