From c9f0c972bf3f2b42acad5e3db0ef030622589aa4 Mon Sep 17 00:00:00 2001 From: Victor Vogel Date: Sun, 1 Nov 2026 16:28:31 +0000 Subject: [PATCH 1/2] perf(ci): workflow-only changes skip package jobs Changes under .github/workflows/ were unknown paths, so a PR that only edited a release, mobile or triage workflow ran every package job. Mark those workflows inert, keeping ci.yml (it defines the jobs) and release.yml and web-preview.yml (.github/scripts tests read them) on the run-everything path. Co-Authored-By: Claude Opus 5.5 --- .github/scripts/ci-changes.cjs | 3 +++ scripts/check-changed.test.ts | 19 +++++++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/.github/scripts/ci-changes.cjs b/.github/scripts/ci-changes.cjs index 0f817be60c35..9954ab3ce6f4 100644 --- a/.github/scripts/ci-changes.cjs +++ b/.github/scripts/ci-changes.cjs @@ -10,6 +10,9 @@ const INERT = [ /^\.(agents|cursor|vscode|devcontainer|macroscope|repos)\//, /^[^/]+\.md$/, /^LICENSE$/, + // Package tests read no other workflow. ci.yml defines these jobs, and the + // .github/scripts tests read release.yml and web-preview.yml. + /^\.github\/workflows\/(?!(ci|release|web-preview)\.yml$)/, ]; // Shared test setup and vendored mobile dependencies affect every package. diff --git a/scripts/check-changed.test.ts b/scripts/check-changed.test.ts index b0e0fe01e851..f76acee3c78b 100644 --- a/scripts/check-changed.test.ts +++ b/scripts/check-changed.test.ts @@ -46,6 +46,25 @@ describe("check:changed", () => { assert.deepStrictEqual(decide(["docs/user/install.md"], packages, false).affected, []); }); + it("runs no package jobs for workflows that package tests do not read", () => { + const packages = readWorkspace(); + const { affected, outputs } = decide([".github/workflows/pr-size.yml"], packages, false); + assert.deepStrictEqual(affected, []); + assert.isFalse(Object.values(outputs).some((value) => value === true)); + assert.deepStrictEqual( + decide([".github/workflows/pr-size.yml", "apps/web/src/main.tsx"], packages, false).affected, + ["@t3tools/scripts", "@t3tools/web"], + ); + for (const file of [ + ".github/workflows/ci.yml", + ".github/workflows/release.yml", + ".github/workflows/web-preview.yml", + ".github/actions/setup-ci-deps/action.yml", + ]) { + assert.lengthOf(decide([file], packages, false).affected, packages.length, file); + } + }); + it.effect( "keeps weighted steps within the budget, in order, and serial steps one at a time", () => From 93fa7c4ba6d4d718abe442a32b1bdc5710e6a16a Mon Sep 17 00:00:00 2001 From: Victor Vogel Date: Sun, 1 Nov 2026 16:34:18 +0000 Subject: [PATCH 2/2] perf(ci): list the inert workflows by name so new ones still run everything Co-Authored-By: Claude Opus 5.5 --- .github/scripts/ci-changes.cjs | 30 +++++++++++++++++++++++++++--- scripts/check-changed.test.ts | 4 +++- 2 files changed, 30 insertions(+), 4 deletions(-) diff --git a/.github/scripts/ci-changes.cjs b/.github/scripts/ci-changes.cjs index 9954ab3ce6f4..b47199351c4d 100644 --- a/.github/scripts/ci-changes.cjs +++ b/.github/scripts/ci-changes.cjs @@ -5,14 +5,38 @@ const path = require("node:path"); const root = path.resolve(__dirname, "../.."); +// Workflows no test reads. ci.yml defines the CI jobs, tests read release.yml +// and web-preview.yml, and a workflow missing from this list runs everything. +const INERT_WORKFLOWS = [ + "agent-context-budget", + "deploy-relay", + "desktop-macos-preview", + "desktop-macos-preview-publish", + "issue-labels", + "mobile-android-apk", + "mobile-eas-preview", + "mobile-eas-preview-fork", + "mobile-eas-production", + "mobile-fingerprint-check", + "mobile-fingerprint-label", + "mobile-showcase-screenshots", + "pr-size", + "pr-vouch", + "publish-aur", + "relay-preview", + "relay-preview-cleanup", + "release-desktop", + "stale-needs-more-info", + "thread-transfer-report", + "windows-tests", +]; + const INERT = [ /^docs\//, /^\.(agents|cursor|vscode|devcontainer|macroscope|repos)\//, /^[^/]+\.md$/, /^LICENSE$/, - // Package tests read no other workflow. ci.yml defines these jobs, and the - // .github/scripts tests read release.yml and web-preview.yml. - /^\.github\/workflows\/(?!(ci|release|web-preview)\.yml$)/, + new RegExp(`^\\.github/workflows/(${INERT_WORKFLOWS.join("|")})\\.yml$`), ]; // Shared test setup and vendored mobile dependencies affect every package. diff --git a/scripts/check-changed.test.ts b/scripts/check-changed.test.ts index f76acee3c78b..3e22936389c1 100644 --- a/scripts/check-changed.test.ts +++ b/scripts/check-changed.test.ts @@ -59,7 +59,9 @@ describe("check:changed", () => { ".github/workflows/ci.yml", ".github/workflows/release.yml", ".github/workflows/web-preview.yml", - ".github/actions/setup-ci-deps/action.yml", + ".github/workflows/new-workflow.yml", + ".github/scripts/ci-changes.cjs", + ".github/actions/ci-changes/action.yml", ]) { assert.lengthOf(decide([file], packages, false).affected, packages.length, file); }