ci(e2e): gate affected workflows before runner setup - #4864
Conversation
…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.
|
✅ Deploy Preview for module-federation-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
@module-federation/devtools
@module-federation/cli
create-module-federation
@module-federation/dts-plugin
@module-federation/enhanced
@module-federation/error-codes
@module-federation/esbuild
@module-federation/managers
@module-federation/manifest
@module-federation/metro
@module-federation/metro-plugin-rnc-cli
@module-federation/metro-plugin-rnef
@module-federation/metro-plugin-rock
@module-federation/modern-js
@module-federation/modern-js-v3
@module-federation/native-federation-tests
@module-federation/native-federation-typescript
@module-federation/nextjs-mf
@module-federation/node
@module-federation/observability-plugin
@module-federation/playground
@module-federation/retry-plugin
@module-federation/rsbuild-plugin
@module-federation/rspack
@module-federation/rspress-plugin
@module-federation/runtime
@module-federation/runtime-core
@module-federation/runtime-tools
@module-federation/sdk
@module-federation/storybook-addon
@module-federation/third-party-dts-extractor
@module-federation/treeshake-frontend
@module-federation/treeshake-server
@module-federation/typescript
@module-federation/utilities
@module-federation/webpack-bundler-runtime
@module-federation/bridge-react
@module-federation/bridge-react-webpack-plugin
@module-federation/bridge-shared
@module-federation/bridge-vue3
@module-federation/inject-external-runtime-core-plugin
commit: |
Bundle Size Report6 package(s) changed, 36 unchanged. Bundle targets
Consumer scenarios
Total dist (raw): 35.78 MB (no change) Bundle sizes are generated with rslib (Rspack). Package-root metrics preserve the historical report. Tracked subpath exports such as |
…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.
Description
Evaluate all E2E affected decisions once in the parent
checkout-installjob and expose them as a JSON job output. Reusable E2E workflow callers now use job-levelifconditions, 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 --affectedresult withTURBO_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-testpnpm 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 -colorpnpm run verify:turbogit diff --checkFull 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
Checklist