Repository navigation
ci: timer-bound app scenarios run on main, nightly and on labeled PRs instead of gating every PR - #1008
Merged
Conversation
… instead of gating every PR A scenario that waits on real timeouts exports `slow = true` from its scenario.ts. test/apps/run.ts gains --skip-slow and --only-slow; an app named on the command line runs either way, and the run summary names the slow apps it skipped. An empty selection exits 2, so a removed marker fails the slow run instead of passing it with nothing driven. host-closes-silent-page waits out a 40s liveness window and a heartbeat past it, about 80s of the app-scenarios job. It is marked slow. Build & Test's app-scenarios job now runs with --skip-slow on every event. The new Slow app scenarios workflow runs --only-slow on the same packed packages on pushes to main, nightly, on demand (with an optional scenario name), and on a pull request when the ci-slow-scenarios label is added. It is not part of CI / required. Local: --build --skip-slow ran 12 apps in 196.1s and reported host-closes-silent-page as skipped; --only-slow ran it alone and it passed in 81.3s.
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.
App scenarios that wait on real timeouts now mark themselves slow: Build & Test skips them, and a new Slow app scenarios workflow runs them on main, nightly, on demand, and on pull requests labeled
ci-slow-scenarios.Build & Test skips slow apps on every event; the slow workflow runs only them
The
app-scenariosjob runsbun test/apps/run.ts --packages dist/packages --skip-slowon pull requests and on main alike, so no slow app runs twice. Its selection byscripts/ci/plan.tsdoes not change..github/workflows/slow-scenarios.ymlreuses that job's steps (Bun and npm caches,restore-dist, Playwright Chromium,pack-packages.sh --skip-build, log upload on failure) and runs--only-slow. Triggers:pushmainschedule47 9 * * *, 30 minutes after Build & Test's nightlypull_requestlabeledci-slow-scenarios; a push after the label does not re-run it (remove and re-add the label, or re-run)workflow_dispatchscenarioinput that runs one app by nameIt has
permissions: contents: read, uses no secrets, and is not one of the needs ofCI / required. Concurrency is one group per ref with cancel in progress; a run started by any other label gets its own group, so labeling a PRci-packagingdoes not cancel a slow run in progress.An empty selection exits 2. If the last
slow = truemarker is removed, the slow workflow fails instead of passing with nothing driven.AGENTS.mdrule 7 now says a timer-bound scenario is marked slow, where it runs, and that a PR changing what one covers gets theci-slow-scenarioslabel and names the run.Risk
host-closes-silent-pagecovers (peer liveness inpackages/cli/src/serve/) no longer failsCI / required. It fails on the next push to main or the nightly, unless the PR carries the label. The AGENTS.md rule is the guard.scenario.tsbefore installing anything when--skip-slowor--only-slowis passed, so a scenario's top level must import only the driver, Playwright, and node built-ins. Every scenario does today;test/apps/README.mdsays so.workflow_dispatchcannot be exercised until this file is on main.Integration test: the Slow app scenarios run this PR starts when it is labeled
ci-slow-scenarios, and theapp-scenariosjob of this PR's Build & Test run, which skips the slow app. The deletion guard has nothing to acknowledge: no test file is deleted and no job is removed.Implementation notes
test/apps/selection.tsholds the option parsing (moved fromrun.ts) andselectApps, so the selection is testable without runningrun.ts's top-levelmain().test/apps/selection.test.tscovers skip, only, include, named apps under each filter, the summary clause, the flag conflict, and the real marker onhost-closes-silent-page. Theapp-scenariosjob runs it before the scenarios.--skip-slowand--only-slowtogether are refused.scripts/publish-alpha.shstill runs every app, slow ones included, before publishing.bun test/apps/run.ts --build --skip-slowpassed 12 apps in 196.1s;--only-slowpassedhost-closes-silent-pagein 81.3s (99.8s with packing).actionlint1.7.7 reports nothing forbuild.ymlandslow-scenarios.yml.bun test scripts/ci/workflow-paths.test.ts scripts/ci/plan.test.ts scripts/ci/deletion-guard.test.tspasses.