ci: gate the four playgrounds on pull requests - #107
Merged
Conversation
The playgrounds are the only place the framework bindings are exercised as a consumer uses them, through a real bundler against the public entry points, and nothing built or type-checked them: `check:types` filters to `./packages/**` and no workflow referenced `playgrounds/`. Four broken playground builds had accumulated undetected. Add a `Playgrounds` workflow that installs, builds the packages, then builds all four. It triggers on `pull_request` only, filtered to `playgrounds/**`, `packages/**` and the lockfile, so a change under `crates/` or `bindings/` does not pay for it; there is no `push` and no `schedule` trigger. `next build` rewrote two tracked files, `next-env.d.ts` and `tsconfig.json`, into a shape `biome ci` rejects. Commit `tsconfig.json` carrying the values Next writes, biome-formatted, and Next now leaves it alone; commit `next-env.d.ts` exactly as Next emits it and drop that one generated file from biome's file list, since its quote and semicolon style is not negotiable with the generator. A `git diff --exit-code` step keeps both true. The Solid playground built without any type-check at all, unlike the React one. Give it `tsc && vite build`.
Contributor
|
Thanks for the pull request — it is in the queue and a maintainer will review it. This repository is maintained on a weekly cadence. Anything opened from outside gets What happens next:
If this is a security fix for an unreported vulnerability, please close it and use |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The four playgrounds were built and type-checked by nothing.
pnpm check:typesfilters to
./packages/**, no workflow referencedplaygrounds/in any form,and the unit suites import from source — so the one place the framework bindings
get exercised the way a consumer uses them, through a real bundler against the
public entry points, had no gate at all. That is how four broken playground
builds accumulated undetected.
What this adds
A
Playgroundsworkflow: install,pnpm build, thenpnpm build:playgroundsover all four, plus a
git diff --exit-codeguard on the Next playground'sgenerated files.
pull_requestonly, filtered toplaygrounds/**,packages/**,pnpm-lock.yamland the workflow file itself — a playground can only break fromone of those, so a
crates/orbindings/pull request does not pay for it.No
pushtrigger: theagent/**push leg inci.ymlalready lets a branch gateitself, and duplicating it here would pay twice per commit while a pull request
is open. No
schedule:— nothing reads a nightly result.One job building four playgrounds sequentially, not a matrix leg each: a matrix
would pay for four checkouts, four installs and four
pnpm builds toparallelise about 12s of actual playground building.
The generated-file problem, and why it is fixed rather than worked around
next buildrewrote two tracked files into a statebiome cirejects:playgrounds/next/tsconfig.json— Next setsjsxtoreact-jsxand adds.next/dev/types/**/*.tstoinclude, and rewrites the whole file in its ownformatting while doing it. Both values are now committed, biome-formatted.
Next only writes the file when a value is missing, so with them present it
leaves the formatting alone. Verified:
next buildtwice over, no diff.playgrounds/next/next-env.d.ts— Next 16 replaced the/// <reference path>line with two
importstatements, and it writes them with double quotes andsemicolons. This repo's biome config is single quotes, no semicolons. That one
is not reconcilable: the file is regenerated on every build and says so in its
own header. It is committed exactly as Next emits it and dropped from biome's
file list — one generated file, by exact path, not a directory.
The
git diff --exit-code -- playgrounds/nextstep is what keeps both true. Ifit ever fails, run
pnpm build:playgroundslocally and commit what Next wrote.Also
playgrounds/vite-solidbuilt withvite buildand no type-check at all,unlike
vite-react'stsc && vite build. It now type-checks. It was alreadyclean; this closes the hole rather than fixing a break.
pnpm build:playgroundsis a root script so the gate and a developer run thesame command.
Evidence
From a clean tree at this branch's head, Node 22.23.2, pnpm 10.33.0:
The gate was proved to fail, not just to pass:
playgrounds/vite-solid/src/App.tsx→error TS2322, exit 2. Before this branch that file was never type-checked.export * from '../actions/compileContract'removed frompackages/core/src/exports/index.ts→Export compileContract doesn't exist in target module, build failed. A public-surface narrowing inpackages/corenow fails on the playgrounds.
Cost
Zero billable minutes. This repository is public, so GitHub-hosted standard
runners are free on it —
GET /actions/runs/{id}/timingreportsbillable.UBUNTU.total_ms: 0for the most recent pull request run. The cost iswall-clock only: about 1m30s of runner time on the pull requests that touch
packages/orplaygrounds/, against theBuildjob's current 39s.