You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
chore(ci): Streamline CI setup to split bundle, layer, tarball generation (#20396)
## Summary
Restructures the CI Build & Test pipeline to split the monolithic build
step into parallel jobs and eliminate redundant work, reducing the
critical path for test execution.
### Key changes
**Split build into parallel jobs:**
- The main `Build` job now only runs `build:transpile`, `build:types`,
and `build:extension` (via `yarn build:ci`)
- **Bundle builds** (`job_build_bundles`) run in a separate parallel job
after `Build` — only when browser integration tests are affected
- **Lambda layer build** (`job_build_layer`) runs in its own job — only
when `@sentry/aws-serverless` or related E2E tests are affected
- **Tarball packaging** (`job_build_tarballs`) is a dedicated job that
replaces the old `job_e2e_prepare` step
**Smarter build artifact handling:**
- Replaced the hand-maintained `CACHED_BUILD_PATHS` list with a dynamic
Nx-derived artifact path computation
(`scripts/ci-print-build-artifact-paths.mjs`) that reads the Nx project
graph to determine
exactly which output directories to upload
- Removed the tarball cache (`BUILD_CACHE_TARBALL_KEY`) — tarballs are
now built once and passed as artifacts, not cached across runs
- Each build stage uploads its own artifact (`build-output`,
`build-bundle-output`, `build-layer-output`), so downstream jobs only
download what they need
**E2E test matrix generation moved into Build:**
- The E2E test matrix (`ci:build-matrix`) is now computed inside the
`Build` job instead of a separate `job_e2e_prepare` job
- This removes `job_e2e_prepare` as a separate step and shaves off the
sequential dependency
**NX cache improvements:**
- Moved NX cache directory from `.nxcache` to `.nx/cache` (includes
`workspace-data` for better cache hits)
- Changed from `actions/cache` (save+restore) to `actions/cache/save` in
Build + `actions/cache/restore` in downstream jobs
- Cache is now scoped per-PR (`${{ github.head_ref }}-${{ github.run_id
}}`) for more predictable behavior
**Other cleanups:**
- `getTestMatrix.ts` → `getTestMatrix.mjs` — removed the `ts-node`,
`glob`, and `yaml` dependencies by rewriting as plain ESM with `node:fs`
and `node:util`
- Fixed 1aws-serverless1 to include the lambda extension in the
transpile step, to ensure it is properly cached and restored, and as we
depend on this for the tarball as well.
- Fixed `angular` dependency resolution for CI builds
- Fixes `nestjs` types output for proper caching
### Before → After pipeline structure
```
BEFORE:
Metadata → Build (transpile+types+bundles+layer+tarballs) → All tests
AFTER:
Metadata → Build (transpile+types only)
├── Build bundles ──→ Browser Playwright tests
├── Build layer ───→ (only when needed)
├── Build tarballs → E2E tests
└── Unit/Integration/Remix tests (no extra build needed)
```
Somehow, cache restoration with nx seems hit or miss, it works sometimes
but not other times. I opened an issue here:
nrwl/nx#35403 - fixing this would improve this
by a couple minutes, so would be nice to get there...
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: dev-packages/e2e-tests/README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -198,7 +198,7 @@ try {
198
198
```
199
199
200
200
Test apps in the folder `test-applications` will be automatically picked up by CI in the job `job_e2e_tests` (in `.github/workflows/build.yml`).
201
-
The test matrix for CI is generated in `dev-packages/e2e-tests/lib/getTestMatrix.ts`.
201
+
The test matrix for CI is generated in `dev-packages/e2e-tests/lib/getTestMatrix.mjs`.
202
202
203
203
For each test app, CI checks its dependencies (and devDependencies) to see if any of them have changed in the current PR (based on nx affected projects).
204
204
For example, if something is changed in the browser package, only E2E test apps that depend on browser will run, while others will be skipped.
0 commit comments