ci: skip scaffolding tests on Changesets release PRs - #3827
Merged
Conversation
Contributor
|
Oxygen deployed a preview of your
Learn more about Hydrogen's GitHub integration. |
Merged
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the CI workflow to avoid running the test_scaffolding job on Changesets-generated release PRs, where scaffolding is expected to fail because the scaffolded app installs exact package versions that have not been published to npm yet.
Changes:
- Add a job-level
if:condition to skiptest_scaffoldingwhen the PR source branch starts withchangeset-release/. - Document (inline) why the job is skipped for those PRs.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
fredericoo
approved these changes
Jul 1, 2026
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.
TL;DR: Changesets release PRs always fail the
test_scaffoldingjob, because it installs a scaffolded app from npm and the release bumps workspace packages to versions that are not published yet. This skips that job on release PRs so their CI can go green instead of relying on merging past red checks.Why
The
test_scaffoldingjob scaffolds a Hydrogen app and installs its dependencies from the public npm registry. The skeleton template pins@shopify/hydrogen,@shopify/hydrogen-codegen, and@shopify/mini-oxygenwithworkspace:*, and the CLI build (packages/cli/tsup.config.ts→replaceWorkspaceProtocolVersions) bakes those into exact versions at build time.On a Changesets release PR, those exact versions are the new versions being released — which are not published to npm until the PR merges. So
npm installfails withETARGET(e.g.No matching version found for @shopify/mini-oxygen@4.2.0), no lockfile is produced, and the "Verify lockfile" step fails.This is not specific to any one PR. It reproduces on every release PR:
[ci] release 2026.4.0) and [ci] release 2026.4.4 #3791 ([ci] release 2026.4.4) also failed all 5 and were merged anyway.It became a problem once two changes combined: the scaffolding job was added (#3458) and the skeleton switched to
workspace:*with build-time exact-version baking (#3475). Before that, the skeleton used caret ranges (e.g.^4.0.0) that any already-published version could satisfy, so release PRs passed.What this changes
if:guard totest_scaffoldingthat skips it when the PR comes from achangeset-release/branch.github.head_refis the source branch onpull_requestevents and empty onpushtomain, so the job still runs on normal PRs and on pushes tomain(after the release merges and the versions are published).Risk
on:level, which would leave a required check pending forever.main.How to Test
changeset-release/main), confirm the⬣ Scaffolding tests (...)checks show Skipped rather than failing.