Skip to content

ci(e2e): gate affected workflows before runner setup - #4864

Merged
ScriptedAlchemy merged 14 commits into
mainfrom
ci/gate-e2e-setup
Jul 15, 2026
Merged

ci(e2e): gate affected workflows before runner setup#4864
ScriptedAlchemy merged 14 commits into
mainfrom
ci/gate-e2e-setup

Conversation

@ScriptedAlchemy

@ScriptedAlchemy ScriptedAlchemy commented Jul 2, 2026

Copy link
Copy Markdown
Member

Description

Evaluate all E2E affected decisions once in the parent checkout-install job and expose them as a JSON job output. Reusable E2E workflow callers now use job-level if conditions, so unaffected suites are skipped before GitHub allocates their runners or runs checkout, dependency installation, Cypress, cache, and package-build setup.

The affected policy is fail-open and uses Turbo's documented ls --affected result with TURBO_SCM_BASE / TURBO_SCM_HEAD. Suite app names and suite-specific workflow/runner inputs live in one registry. Local CI uses the same suite selectors, while Metro's explicit app override remains supported. The existing local-only shared-tree-shaking suite remains outside the GitHub parent fanout.

Validation:

  • node --test tools/scripts/ci-is-affected.test.mjs (16/16)
  • pnpm run ci:local --only=build-and-test
  • pnpm run ci:local --only=e2e-modern (affected path: 23/23 Turbo tasks)
  • CI_LOCAL_BASE_REF=1288d6ee^ CI_LOCAL_HEAD_REF=1288d6ee pnpm run ci:local --only=e2e-modern (docs-only path skipped Cypress, package build, and tests)
  • actionlint -color
  • pnpm run verify:turbo
  • Prettier and git diff --check
  • Real docs-only and shared-policy decision probes (all false / all true respectively)

Full platform E2E jobs were not run locally; the pushed GitHub Actions matrix is the CI-aligned verification for Linux, Android, and macOS/iOS behavior.

Related Issue

No linked issue.

Types of changes

  • Docs change / refactoring / dependency upgrade
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Checklist

  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • I have updated the documentation.

…package builds

The e2e workflows built all packages and installed Cypress before
evaluating ci-is-affected, so unaffected PRs paid several minutes of
setup per job across eleven workflows just to decide to skip. The gate
only needs installed dependencies and git history, so run it right
after pnpm install and skip the Turbo cache restore, Cypress install,
and package build when the job is not affected.
@changeset-bot

changeset-bot Bot commented Jul 2, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: dbb445b

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@netlify

netlify Bot commented Jul 2, 2026

Copy link
Copy Markdown

Deploy Preview for module-federation-docs ready!

Name Link
🔨 Latest commit fa44daf
🔍 Latest deploy log https://app.netlify.com/projects/module-federation-docs/deploys/6a46eb34a468210008e88105
😎 Deploy Preview https://deploy-preview-4864--module-federation-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@pkg-pr-new

pkg-pr-new Bot commented Jul 2, 2026

Copy link
Copy Markdown

Open in StackBlitz

@module-federation/devtools

pnpm add https://pkg.pr.new/@module-federation/devtools@dbb445b

@module-federation/cli

pnpm add https://pkg.pr.new/@module-federation/cli@dbb445b

create-module-federation

pnpm add https://pkg.pr.new/create-module-federation@dbb445b

@module-federation/dts-plugin

pnpm add https://pkg.pr.new/@module-federation/dts-plugin@dbb445b

@module-federation/enhanced

pnpm add https://pkg.pr.new/@module-federation/enhanced@dbb445b

@module-federation/error-codes

pnpm add https://pkg.pr.new/@module-federation/error-codes@dbb445b

@module-federation/esbuild

pnpm add https://pkg.pr.new/@module-federation/esbuild@dbb445b

@module-federation/managers

pnpm add https://pkg.pr.new/@module-federation/managers@dbb445b

@module-federation/manifest

pnpm add https://pkg.pr.new/@module-federation/manifest@dbb445b

@module-federation/metro

pnpm add https://pkg.pr.new/@module-federation/metro@dbb445b

@module-federation/metro-plugin-rnc-cli

pnpm add https://pkg.pr.new/@module-federation/metro-plugin-rnc-cli@dbb445b

@module-federation/metro-plugin-rnef

pnpm add https://pkg.pr.new/@module-federation/metro-plugin-rnef@dbb445b

@module-federation/metro-plugin-rock

pnpm add https://pkg.pr.new/@module-federation/metro-plugin-rock@dbb445b

@module-federation/modern-js

pnpm add https://pkg.pr.new/@module-federation/modern-js@dbb445b

@module-federation/modern-js-v3

pnpm add https://pkg.pr.new/@module-federation/modern-js-v3@dbb445b

@module-federation/native-federation-tests

pnpm add https://pkg.pr.new/@module-federation/native-federation-tests@dbb445b

@module-federation/native-federation-typescript

pnpm add https://pkg.pr.new/@module-federation/native-federation-typescript@dbb445b

@module-federation/nextjs-mf

pnpm add https://pkg.pr.new/@module-federation/nextjs-mf@dbb445b

@module-federation/node

pnpm add https://pkg.pr.new/@module-federation/node@dbb445b

@module-federation/observability-plugin

pnpm add https://pkg.pr.new/@module-federation/observability-plugin@dbb445b

@module-federation/playground

pnpm add https://pkg.pr.new/@module-federation/playground@dbb445b

@module-federation/retry-plugin

pnpm add https://pkg.pr.new/@module-federation/retry-plugin@dbb445b

@module-federation/rsbuild-plugin

pnpm add https://pkg.pr.new/@module-federation/rsbuild-plugin@dbb445b

@module-federation/rspack

pnpm add https://pkg.pr.new/@module-federation/rspack@dbb445b

@module-federation/rspress-plugin

pnpm add https://pkg.pr.new/@module-federation/rspress-plugin@dbb445b

@module-federation/runtime

pnpm add https://pkg.pr.new/@module-federation/runtime@dbb445b

@module-federation/runtime-core

pnpm add https://pkg.pr.new/@module-federation/runtime-core@dbb445b

@module-federation/runtime-tools

pnpm add https://pkg.pr.new/@module-federation/runtime-tools@dbb445b

@module-federation/sdk

pnpm add https://pkg.pr.new/@module-federation/sdk@dbb445b

@module-federation/storybook-addon

pnpm add https://pkg.pr.new/@module-federation/storybook-addon@dbb445b

@module-federation/third-party-dts-extractor

pnpm add https://pkg.pr.new/@module-federation/third-party-dts-extractor@dbb445b

@module-federation/treeshake-frontend

pnpm add https://pkg.pr.new/@module-federation/treeshake-frontend@dbb445b

@module-federation/treeshake-server

pnpm add https://pkg.pr.new/@module-federation/treeshake-server@dbb445b

@module-federation/typescript

pnpm add https://pkg.pr.new/@module-federation/typescript@dbb445b

@module-federation/utilities

pnpm add https://pkg.pr.new/@module-federation/utilities@dbb445b

@module-federation/webpack-bundler-runtime

pnpm add https://pkg.pr.new/@module-federation/webpack-bundler-runtime@dbb445b

@module-federation/bridge-react

pnpm add https://pkg.pr.new/@module-federation/bridge-react@dbb445b

@module-federation/bridge-react-webpack-plugin

pnpm add https://pkg.pr.new/@module-federation/bridge-react-webpack-plugin@dbb445b

@module-federation/bridge-shared

pnpm add https://pkg.pr.new/@module-federation/bridge-shared@dbb445b

@module-federation/bridge-vue3

pnpm add https://pkg.pr.new/@module-federation/bridge-vue3@dbb445b

@module-federation/inject-external-runtime-core-plugin

pnpm add https://pkg.pr.new/@module-federation/inject-external-runtime-core-plugin@dbb445b

commit: dbb445b

@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Bundle Size Report

6 package(s) changed, 36 unchanged.

Bundle targets

Package Web bundle (gzip) Delta Node bundle (gzip) Delta
@module-federation/cli 2.3 kB -1 B (-0.0%) 2.4 kB -30 B (-1.2%)
@module-federation/core 1.0 kB -2 B (-0.2%) 1.0 kB -32 B (-2.9%)
@module-federation/devtools 30.3 kB -1 B (-0.0%) 30.3 kB -23 B (-0.1%)
@module-federation/enhanced 2.7 kB +4 B (+0.1%) 2.8 kB -42 B (-1.5%)
@module-federation/metro-plugin-rnc-cli 416 B no change 435 B -25 B (-5.4%)
@module-federation/node 9.2 kB +1 B (+0.0%) 9.2 kB -28 B (-0.3%)

Consumer scenarios

Scenario Web output (gzip) Delta Node output (gzip) Delta Gap (node-web) Delta
Enhanced remoteEntry 21.4 kB -14 B (-0.1%) 23.1 kB -22 B (-0.1%) +1.7 kB -8 B

Total dist (raw): 35.78 MB (no change)
Total ESM gzip: 104.8 kB (no change)
Total web bundle (gzip): 233.1 kB (+1 B (+0.0%))
Total node bundle (gzip): 235.7 kB (-180 B (-0.1%))
Tracked ./bundler entry gzip: 556 B (no change)
Tracked ./bundler web bundle (gzip): 4.8 kB (no change)
Tracked ./bundler node bundle (gzip): 4.8 kB (no change)

Bundle sizes are generated with rslib (Rspack). Package-root metrics preserve the historical report. Tracked subpath exports such as ./bundler are measured separately so ENV_TARGET-driven tree-shaking is visible. Bare imports are externalized to keep package-level sizes consistent, and assets are emitted as resources.

ScriptedAlchemy added 9 commits July 2, 2026 06:06
…s as global e2e inputs

Address review findings: the ten e2e workflows repeated an identical
13-line shell block translating ci-is-affected exit codes into a step
output; the script now writes run-e2e directly to GITHUB_OUTPUT when
--githubOutput is passed, collapsing each gate to one line, and genuine
script crashes now fail the step instead of silently skipping e2e.
Workflow files are also added to the gate's global e2e inputs so
workflow-only changes fail safe into running the full matrix, and stale
file-header comments are corrected. Exit-code mode is unchanged for
ci-local.mjs and the metro workflow.
@ScriptedAlchemy ScriptedAlchemy changed the title ci: run e2e affected gate before expensive setup steps ci(e2e): gate affected workflows before runner setup Jul 15, 2026
@ScriptedAlchemy
ScriptedAlchemy merged commit 727b05d into main Jul 15, 2026
23 checks passed
@ScriptedAlchemy
ScriptedAlchemy deleted the ci/gate-e2e-setup branch July 15, 2026 23:39
@2heal1 2heal1 mentioned this pull request Jul 28, 2026
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.

2 participants