ci: temporarily disable template builds#16371
Merged
Merged
Conversation
PatrikKozak
approved these changes
Apr 23, 2026
Contributor
📦 esbuild Bundle Analysis for payloadThis analysis was generated by esbuild-bundle-analyzer. 🤖
Largest pathsThese visualization shows top 20 largest paths in the bundle.Meta file: packages/next/meta_index.json, Out file: esbuild/index.js
Meta file: packages/payload/meta_index.json, Out file: esbuild/index.js
Meta file: packages/payload/meta_shared.json, Out file: esbuild/exports/shared.js
Meta file: packages/richtext-lexical/meta_client.json, Out file: esbuild/exports/client_optimized/index.js
Meta file: packages/ui/meta_client.json, Out file: esbuild/exports/client_optimized/index.js
Meta file: packages/ui/meta_shared.json, Out file: esbuild/exports/shared_optimized/index.js
DetailsNext to the size is how much the size has increased or decreased compared with the base branch of this PR.
|
denolfe
added a commit
that referenced
this pull request
Jun 4, 2026
# Overview Re-enables the `build-and-test-templates` CI job, disabled in #16371 while it required a published 4.x release of the workspace packages on npm. The job now builds templates against fully local packages and runs non-blocking, so it surfaces template breakage on 4.x without gating PRs. ## Key Changes - **Re-enabled the job, non-blocking** - Restored `if: needs.changes.outputs.needs_build == 'true'` (was `if: false`) and added `continue-on-error: true`, matching the existing `tests-content-api` pattern. Failures show up in CI but do not fail the `all-green` gate until templates are updated for 4.x breaking changes. - **Made the local package install hermetic** - The build now packs all workspace packages (`script:pack --all`) and rewrites `build-template-with-local-pkgs` to point every `@payloadcms/*` (and `payload`) dependency at its local `file:` tarball, in both the dependency entries and `pnpm.overrides`, before a single install. ## Design Decisions The previous flow ran `pnpm add ./*.tgz` before setting overrides. That first install resolved the tarballs' internal cross-dependencies (`@payloadcms/translations`, `@payloadcms/plugin-cloud-storage`, and others) from npm at the in-repo version, which during 4.x beta is unpublished, so it failed with `ERR_PNPM_NO_MATCHING_VERSION`. That is what kept the job disabled. Setting `file:` overrides for the full set of packed packages up front forces every workspace dependency, direct and transitive, to resolve to a local tarball. The install no longer touches npm for any `@payloadcms` package, so the job works regardless of what is published. This mirrors the approach already used by `test/setupProd.ts` for the prod E2E job. Templates still pin the 3.x config API (for example, storage adapters passed to `plugins` rather than the 4.x `storage` array), so the builds currently fail once packages resolve. Running the job non-blocking surfaces that work without holding up merges; the `continue-on-error` flag comes off once the templates are migrated.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
Template build CI jobs fail on
mainafter the version bump to4.0.0-beta.0becausetools/scripts/src/build-template-with-local-pkgs.tshardcodes a stale placeholder version (3.42.0) when rewritingworkspace:*deps, and the 4.x beta isn't published on npm yet. Disable the jobs until the next 4.x beta ships.Example failure: https://github.com/payloadcms/payload/actions/runs/24848623266/job/72743812553
Key Changes
build-and-test-templatesinmain.ymlif:tofalsewith a comment noting it's temporary and should be re-enabled after the next 4.x beta publishes.skipped, so theall-greengate (which only fails onfailure/cancelled) still passes.Design Decisions
Chose to gate at the workflow level rather than patch the template build script. The underlying fix (reading the real workspace version instead of the hardcoded
3.42.0) belongs in a follow-up once we can validate against a published beta; short-circuiting the job here unblocksmainwithout masking the problem in the script itself.