diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 8c6b44a65..2af1483c0 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -162,6 +162,9 @@ jobs: - name: Install dependencies run: pnpm install --frozen-lockfile + - name: Generate web API bindings + run: pnpm --dir src/web-ui run gen:types + - name: Type-check web UI run: pnpm run type-check:web diff --git a/scripts/check-github-config.test.mjs b/scripts/check-github-config.test.mjs index b694ec6c3..ab36b67a7 100644 --- a/scripts/check-github-config.test.mjs +++ b/scripts/check-github-config.test.mjs @@ -276,6 +276,31 @@ test('keeps Rust CI independent, restore-only on PRs, and target-focused', () => ); }); +test('generates web API bindings before nightly web type-check', () => { + const workflow = yaml.parse( + readFileSync(path.join(repoRoot, '.github/workflows/nightly.yml'), 'utf8'), + ); + const packageJob = workflow.jobs.package; + const steps = packageJob.steps; + const generationIndex = steps.findIndex( + (step) => step.name === 'Generate web API bindings', + ); + const typeCheckIndex = steps.findIndex( + (step) => step.name === 'Type-check web UI', + ); + + assert.notEqual(generationIndex, -1); + assert.notEqual(typeCheckIndex, -1); + assert.equal( + steps[generationIndex].run, + 'pnpm --dir src/web-ui run gen:types', + ); + assert.ok( + generationIndex < typeCheckIndex, + 'nightly must generate web API bindings before type-checking the web UI', + ); +}); + test('passes the verification key when signing the versioned Windows installer', () => { const workflow = yaml.parse( readFileSync(