-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
Add CI check for Cloudflare Worker build #7743
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds a CI check to verify the Cloudflare Worker build by leveraging turborepo’s dependsOn configurations and by removing legacy pre-scripts. It also introduces a new GitHub Actions workflow dedicated to the Cloudflare OpenNext build.
- Removed prebuild and predev scripts in package.json in favor of turborepo configuration.
- Added new Cloudflare build, preview, and deploy tasks in turbo.json.
- Introduced a dedicated GitHub Actions workflow (.github/workflows/cloudflare-open-next-build.yml) to verify the Cloudflare Worker build.
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
File | Description |
---|---|
apps/site/turbo.json | Updated turborepo tasks with new dependency configurations. |
apps/site/package.json | Removed legacy pre-scripts and adjusted Cloudflare commands. |
.github/workflows/cloudflare-open-next-build.yml | Added new workflow for Cloudflare Worker build validation. |
Comments suppressed due to low confidence (2)
apps/site/package.json:24
- The updated preview script no longer invokes the Cloudflare worker build process, which may affect local preview workflows. Please verify that this change is intentional if local development should not trigger the build.
"cloudflare:preview": "wrangler dev"
apps/site/package.json:25
- The deploy script now directly calls 'wrangler deploy' without a preceding build step, which might lead to deployment of outdated code if the build is not run separately. Confirm that this behavior aligns with the intended deployment workflow.
"cloudflare:deploy": "wrangler deploy"
Codecov ReportAll modified and coverable lines are covered by tests ✅
✅ All tests successful. No failed tests found. Additional details and impacted files@@ Coverage Diff @@
## main #7743 +/- ##
==========================================
+ Coverage 74.85% 74.87% +0.01%
==========================================
Files 98 98
Lines 7895 7895
Branches 200 200
==========================================
+ Hits 5910 5911 +1
+ Misses 1984 1983 -1
Partials 1 1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
… pushes remove windows since the OpenNext adapter is not compatible with it
…o `dependsOn` configs add back `prebuild` script as that is needed for the vercel deployment
… pushes Apply suggestions from code review Co-authored-by: Aviv Keller <[email protected]> Signed-off-by: Dario Piotrowicz <[email protected]>
… pushes remove unnecessary filter
… pushes update incorrect `pull_request_target` to `pull_request`
OpenNext CI run: https://github.com/nodejs/nodejs.org/actions/runs/15002557692/job/42153040053?pr=7743 (In the future, it won't need the label |
Lighthouse Results
|
Co-authored-by: Aviv Keller <[email protected]> Signed-off-by: Dario Piotrowicz <[email protected]>
Description
As suggested by @avivkeller I'm adding a CI check to make sure that the Cloudflare OpenNext adapter build succeeds on PRs/pushes to main.
As part of this I am removing the pre scripts I had before in favour of turborepo
dependsOn
configs (I am not super familiar with turborepo but I thing/guess thatdependsOn
configs should be preferred and replace pre scripts? 🤔)Note
This is a temporary CI check (that's also one of the reasons why I created a new, very easy to delete, workflow file for it instead of adding this to the build workflow) that can help us get some confidence in the OpenNext Cloudflare adapter and in the fact that the adapter doesn't effect DX.
However I think that this will become obsolete/unnecessary as soon as we have some e2e tests that also validate the OpenNext build.
Validation
I've validated this workflow in my nodejs.org fork see action run.
Related Issues
Check List
pnpm format
to ensure the code follows the style guide.pnpm test
to check if all tests are passing.pnpm build
to check if the website builds without errors.