local-ci
Local CI
Use the local CI runner and Turbo/package scripts as the source of truth for validation in this repo.
Quick Start
- Start with the smallest deterministic check that matches the change.
- Prefer
pnpm run ci:local --only=<job>for CI-parity validation. - Prefer direct Turbo or package scripts only when they are the smaller equivalent of the CI job.
- Report exactly which command ran, what failed first, and which expected checks were skipped.
Workflow
1. Inspect available local CI jobs
Run:
pnpm run ci:local --list
Use this when the right job is unclear or when the repo may have added or renamed jobs.
For the current job map, read references/jobs.md.
2. Pick the smallest matching job
Use these defaults:
- Package code in
packages/*: start withbuild-and-testonly if the change is broad; otherwise prefer package build/test commands. - Metro packages or Metro workflow changes: use
build-metro, then Metro E2E jobs only if relevant. - E2E app changes: run the matching
e2e-*job instead ofbuild-and-test. - Devtools workflow or Playwright/devtools changes: run
devtools. - Bundle-size workflow/reporting changes: run
bundle-size. - GitHub workflow syntax only: use
actionlintlocally only to see skip behavior; the actual action is CI-only. - Broad CI, packaging, publint, Turbo, or shared runtime changes: run
build-and-test.
3. Run commands in CI order
When reproducing CI, use the same command shape as the repo:
pnpm run ci:local --only=build-and-test
pnpm run ci:local --only=devtools
pnpm run ci:local --only=e2e-runtime
To run more than one job:
pnpm run ci:local --only=build-and-test,bundle-size
4. Interpret failures correctly
- Treat the first failing step as the actionable failure.
- Ignore known noisy warnings unless they exit non-zero.
- Distinguish repo-wide drift from changed-file gates.
- If
ci:localfails inCheck code format, inspect the changed-file formatter result before running broader builds. - If a dependency build outside the touched scope fails, note it separately as an unrelated blocker.
Common Cases
Broad package or runtime/plugin change
Run:
pnpm run ci:local --only=build-and-test
If that fails on format first, fix the changed files before rerunning the whole job.
One package only
Prefer the smaller direct command first:
pnpm exec turbo run build --filter=@module-federation/<pkg>
pnpm exec turbo run test --filter=@module-federation/<pkg> --force
Then run build-and-test only if the user asks for CI parity or the package change affects shared build/runtime behavior.
E2E change
Run the matching job from references/jobs.md, not the whole matrix.
Workflow change
Use the local CI job if one exists for the workflow's behavior. For workflow syntax, pair local validation with the repo's actionlint path when relevant.
Notes
ci:localsetsCI=trueand mirrors the repo workflow order.- Some jobs intentionally skip GitHub-only actions such as
actionlintandbundle-size-comment. - The repo uses
pnpm, Node 20, and Turbo as the standard execution path. - In worktrees, still use Turbo/package scripts directly as documented by the repo instructions.
More from module-federation/core
mf
All-in-one Module Federation skill. Use when the user asks anything about MF — concepts, configuration, runtime API, shared dependencies, type errors, runtime error code troubleshooting, slow builds, Bridge integration, or adding MF to an existing project.
412mf-integrate
Integrate Module Federation into an existing project — add provider (exposes modules) or consumer (loads remote modules) configuration. Use when the user wants to add Module Federation to an existing Rsbuild / Rspack / Webpack / Modern.js / Next.js / Vite project, set up a remote, create a host app, or quickly consume the demo provider to see MF working. Default role is consumer.
107mf-docs
Answer questions about Module Federation (MF) — configuration, runtime API, build plugins (Webpack/Rspack/Rsbuild/Vite), framework integration (React/Vue/Next.js/Modern.js/Angular), shared dependencies, exposes, remotes, debugging, troubleshooting, and micro-frontend architecture. Use this skill when the user asks anything about module federation, remote modules, shared deps, mf-manifest, federation runtime, or micro-frontends with MF.
100mf-context
Collects the current project's Module Federation context (MFContext) and outputs a structured summary. Serves as the data foundation for all MF diagnostic Skills; can also be called standalone to quickly understand the project's MF configuration.
66mf-shared-deps
Check Module Federation shared dependency configuration: detect shared/externals conflicts, antd/arco transformImport blocking shared deps, and multiple versions of the same shared package in build artifacts. Use when shared dependencies fail to be shared, or host and remote load duplicate instances of a library.
61mf-perf
Check Module Federation local development performance configuration: detect whether recommended performance optimization options are enabled to alleviate slow HMR and slow build speed.
60