Skip to content

chore: Typecheck examples in CI#2593

Merged
ibgreen merged 10 commits intomasterfrom
ib/typecheck-examples
Apr 5, 2026
Merged

chore: Typecheck examples in CI#2593
ibgreen merged 10 commits intomasterfrom
ib/typecheck-examples

Conversation

@ibgreen
Copy link
Copy Markdown
Collaborator

@ibgreen ibgreen commented Apr 5, 2026

Problem

Example apps were not part of the main CI validation path, so API drift in examples/ could slip through until someone actually ran an example. That is what happened with the stale UniformStore usage in the cube example: yarn lint and yarn build stayed green because they validate the packages, not the example workspaces.

Solution

Add a lightweight example typecheck step as its own parallel GitHub Actions job.

Instead of bundling every example, this change adds a repo-level examples:typecheck command that runs tsc --noEmit against example workspaces. The CI wiring runs that command in a separate examples job so failures are isolated from the main package/test job and do not slow down the critical path.

For the initial rollout, the script targets a curated set of examples that already have clean compile coverage. That keeps CI useful immediately while avoiding unrelated legacy example type debt blocking every PR.

Changes

CI

  • Added a new parallel examples job to .github/workflows/test.yml
  • Kept the existing test and website jobs unchanged
  • The new job runs:
    • checkout
    • Corepack/Yarn setup
    • Node setup with Yarn cache
    • yarn install --immutable
    • yarn examples:typecheck

Repo scripts

  • Added examples:typecheck to package.json

Example typecheck runner

  • Added scripts/examples-typecheck.mjs
  • The script:
    • discovers example workspaces under examples/*/*
    • generates a temporary tsconfig per workspace
    • runs tsc --noEmit for each selected example
    • adds ambient declarations for asset imports used by examples
    • resets TS path aliases so example imports resolve through workspace packages instead of monorepo source aliases

Scope

  • Limited the initial CI coverage to a green subset of maintained examples
  • Added comments in the script explaining that the remaining examples still carry unrelated type debt and can be onboarded incrementally

Validation

  • yarn examples:typecheck
  • yarn lint fix

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: feb56c3c61

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread examples/integrations/external-context/app.ts
@ibgreen ibgreen merged commit 92abf5f into master Apr 5, 2026
3 checks passed
@ibgreen ibgreen deleted the ib/typecheck-examples branch April 5, 2026 14:02
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