From d91d69a7ffa709509b008caf206c1f604894933a Mon Sep 17 00:00:00 2001 From: Alem Tuzlak Date: Tue, 10 Nov 2026 16:37:20 +0100 Subject: [PATCH 1/3] ci: publish package previews of pull requests on TanStack Source --- .source/workflows/pr.ts | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/.source/workflows/pr.ts b/.source/workflows/pr.ts index a350ff1758..37187a85f8 100644 --- a/.source/workflows/pr.ts +++ b/.source/workflows/pr.ts @@ -1,6 +1,7 @@ // The `Test` check of .github/workflows/pr.yml, on TanStack Source. -// The Coverage and Preview jobs of pr.yml stay on GitHub for now. -import { defineWorkflow, pullRequest, setup } from '@tanstack-source/ci' +// The Coverage job of pr.yml stays on GitHub for now. The preview job publishes the packages of the pull +// request into the assets of the repository, like the Preview job of pr.yml does with pkg.pr.new. +import { defineWorkflow, packagePreview, pullRequest, setup } from '@tanstack-source/ci' export default defineWorkflow('pr', { on: [pullRequest()], @@ -28,4 +29,23 @@ export default defineWorkflow('pr', { { name: 'Install dependencies', run: 'pnpm install --frozen-lockfile' }, { name: 'Run Checks', run: 'pnpm run test:pr' }, ], +}).job('preview', { + // The same image and egress as test: pnpm install runs the Playwright postinstall of testing/e2e. + image: 'browser', + env: { NX_NO_CLOUD: 'true' }, + egress: [ + 'registry.npmjs.org', + 'nodejs.org', + 'cdn.playwright.dev', + 'playwright.download.prss.microsoft.com', + ], + // Upload the packed packages to package-previews/ in the assets, and keep one comment on the pull request. + permissions: { packages: 'preview' }, + steps: [ + setup.node(), + setup.pnpm(), + { name: 'Install dependencies', run: 'pnpm install --frozen-lockfile' }, + { name: 'Build Packages', run: 'pnpm run build:all' }, + packagePreview({ npm: ['packages/*'] }), + ], }) From 4542ad64974311b70039dac4ef56d542b548402e Mon Sep 17 00:00:00 2001 From: "autofix-ci[bot]" <114827586+autofix-ci[bot]@users.noreply.github.com> Date: Tue, 10 Nov 2026 15:40:51 +0000 Subject: [PATCH 2/3] ci: apply automated fixes --- .source/workflows/pr.ts | 95 ++++++++++++++++++++++------------------- 1 file changed, 51 insertions(+), 44 deletions(-) diff --git a/.source/workflows/pr.ts b/.source/workflows/pr.ts index 37187a85f8..d75e01f167 100644 --- a/.source/workflows/pr.ts +++ b/.source/workflows/pr.ts @@ -1,51 +1,58 @@ // The `Test` check of .github/workflows/pr.yml, on TanStack Source. // The Coverage job of pr.yml stays on GitHub for now. The preview job publishes the packages of the pull // request into the assets of the repository, like the Preview job of pr.yml does with pkg.pr.new. -import { defineWorkflow, packagePreview, pullRequest, setup } from '@tanstack-source/ci' +import { + defineWorkflow, + packagePreview, + pullRequest, + setup, +} from '@tanstack-source/ci' export default defineWorkflow('pr', { on: [pullRequest()], -}).job('test', { - // The browser image has the Chromium of Playwright 1.57.0. `pnpm install` runs the - // `playwright install chromium` postinstall of testing/e2e, which then downloads nothing. - image: 'browser', - // `nx affected` compares with the base commit, so the job needs the history. - // nrwl/nx-set-shas is built in: NX_BASE and NX_HEAD come from ctx.base and ctx.head. - checkout: { depth: 0 }, - // Nx Cloud is off, so Nx uses the task cache of the forge, and the job needs no secret. - env: { NX_NO_CLOUD: 'true' }, - // npm for packages and pnpm, nodejs.org when .nvmrc names another Node than the image, - // and the Playwright CDNs when the locked Playwright changes. - egress: [ - 'registry.npmjs.org', - 'nodejs.org', - 'cdn.playwright.dev', - 'playwright.download.prss.microsoft.com', - ], - steps: [ - // The steps of TanStack/config/.github/setup: pnpm, Node from .nvmrc, then the install. - setup.node(), - setup.pnpm(), - { name: 'Install dependencies', run: 'pnpm install --frozen-lockfile' }, - { name: 'Run Checks', run: 'pnpm run test:pr' }, - ], -}).job('preview', { - // The same image and egress as test: pnpm install runs the Playwright postinstall of testing/e2e. - image: 'browser', - env: { NX_NO_CLOUD: 'true' }, - egress: [ - 'registry.npmjs.org', - 'nodejs.org', - 'cdn.playwright.dev', - 'playwright.download.prss.microsoft.com', - ], - // Upload the packed packages to package-previews/ in the assets, and keep one comment on the pull request. - permissions: { packages: 'preview' }, - steps: [ - setup.node(), - setup.pnpm(), - { name: 'Install dependencies', run: 'pnpm install --frozen-lockfile' }, - { name: 'Build Packages', run: 'pnpm run build:all' }, - packagePreview({ npm: ['packages/*'] }), - ], }) + .job('test', { + // The browser image has the Chromium of Playwright 1.57.0. `pnpm install` runs the + // `playwright install chromium` postinstall of testing/e2e, which then downloads nothing. + image: 'browser', + // `nx affected` compares with the base commit, so the job needs the history. + // nrwl/nx-set-shas is built in: NX_BASE and NX_HEAD come from ctx.base and ctx.head. + checkout: { depth: 0 }, + // Nx Cloud is off, so Nx uses the task cache of the forge, and the job needs no secret. + env: { NX_NO_CLOUD: 'true' }, + // npm for packages and pnpm, nodejs.org when .nvmrc names another Node than the image, + // and the Playwright CDNs when the locked Playwright changes. + egress: [ + 'registry.npmjs.org', + 'nodejs.org', + 'cdn.playwright.dev', + 'playwright.download.prss.microsoft.com', + ], + steps: [ + // The steps of TanStack/config/.github/setup: pnpm, Node from .nvmrc, then the install. + setup.node(), + setup.pnpm(), + { name: 'Install dependencies', run: 'pnpm install --frozen-lockfile' }, + { name: 'Run Checks', run: 'pnpm run test:pr' }, + ], + }) + .job('preview', { + // The same image and egress as test: pnpm install runs the Playwright postinstall of testing/e2e. + image: 'browser', + env: { NX_NO_CLOUD: 'true' }, + egress: [ + 'registry.npmjs.org', + 'nodejs.org', + 'cdn.playwright.dev', + 'playwright.download.prss.microsoft.com', + ], + // Upload the packed packages to package-previews/ in the assets, and keep one comment on the pull request. + permissions: { packages: 'preview' }, + steps: [ + setup.node(), + setup.pnpm(), + { name: 'Install dependencies', run: 'pnpm install --frozen-lockfile' }, + { name: 'Build Packages', run: 'pnpm run build:all' }, + packagePreview({ npm: ['packages/*'] }), + ], + }) From 7472608dc5d74d2107f992a6181a36afccbc91c1 Mon Sep 17 00:00:00 2001 From: Alem Tuzlak Date: Tue, 10 Nov 2026 17:16:19 +0100 Subject: [PATCH 3/3] ci: plan again with the runner that has packagePreview()