Skip to content

Commit e63084b

Browse files
authored
Merge pull request #2187 from wgqqqqq/fix/nightly-generate-web-api-bindings
fix(ci): generate web bindings in nightly build
2 parents c326156 + 909eea6 commit e63084b

2 files changed

Lines changed: 28 additions & 0 deletions

File tree

‎.github/workflows/nightly.yml‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,9 @@ jobs:
162162
- name: Install dependencies
163163
run: pnpm install --frozen-lockfile
164164

165+
- name: Generate web API bindings
166+
run: pnpm --dir src/web-ui run gen:types
167+
165168
- name: Type-check web UI
166169
run: pnpm run type-check:web
167170

‎scripts/check-github-config.test.mjs‎

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,31 @@ test('keeps Rust CI independent, restore-only on PRs, and target-focused', () =>
276276
);
277277
});
278278

279+
test('generates web API bindings before nightly web type-check', () => {
280+
const workflow = yaml.parse(
281+
readFileSync(path.join(repoRoot, '.github/workflows/nightly.yml'), 'utf8'),
282+
);
283+
const packageJob = workflow.jobs.package;
284+
const steps = packageJob.steps;
285+
const generationIndex = steps.findIndex(
286+
(step) => step.name === 'Generate web API bindings',
287+
);
288+
const typeCheckIndex = steps.findIndex(
289+
(step) => step.name === 'Type-check web UI',
290+
);
291+
292+
assert.notEqual(generationIndex, -1);
293+
assert.notEqual(typeCheckIndex, -1);
294+
assert.equal(
295+
steps[generationIndex].run,
296+
'pnpm --dir src/web-ui run gen:types',
297+
);
298+
assert.ok(
299+
generationIndex < typeCheckIndex,
300+
'nightly must generate web API bindings before type-checking the web UI',
301+
);
302+
});
303+
279304
test('passes the verification key when signing the versioned Windows installer', () => {
280305
const workflow = yaml.parse(
281306
readFileSync(

0 commit comments

Comments
 (0)