Skip to content

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

Merged
merged 8 commits into from
May 15, 2025
Merged

Conversation

dario-piotrowicz
Copy link
Member

@dario-piotrowicz dario-piotrowicz commented May 13, 2025

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 that dependsOn 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

  • I have read the Contributing Guidelines and made commit messages that follow the guideline.
  • I have run pnpm format to ensure the code follows the style guide.
  • I have run pnpm test to check if all tests are passing.
  • I have run pnpm build to check if the website builds without errors.
  • I've covered new added functionality with unit tests if necessary.

@Copilot Copilot AI review requested due to automatic review settings May 13, 2025 14:11
@dario-piotrowicz dario-piotrowicz requested review from a team as code owners May 13, 2025 14:11
Copy link

vercel bot commented May 13, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
nodejs-org ✅ Ready (Inspect) Visit Preview May 13, 2025 6:30pm

Copy link
Contributor

@Copilot Copilot AI left a 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-commenter
Copy link

codecov-commenter commented May 13, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 74.87%. Comparing base (aef4d8f) to head (b301016).

✅ 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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

… 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

update incorrect `pull_request_target` to `pull_request`
@avivkeller avivkeller added the github_actions:pull-request Trigger Pull Request Checks label May 13, 2025
@avivkeller
Copy link
Member

avivkeller commented May 13, 2025

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

Copy link
Contributor

github-actions bot commented May 13, 2025

Lighthouse Results

URL Performance Accessibility Best Practices SEO Report
/en 🟠 89 🟢 100 🟢 100 🟢 91 🔗
/en/about 🟢 100 🟢 100 🟢 100 🟠 82 🔗
/en/about/previous-releases 🟢 100 🟢 100 🟢 100 🟠 83 🔗
/en/download 🟢 93 🟢 100 🟢 100 🟢 91 🔗
/en/blog 🟢 100 🟢 100 🟢 96 🟢 92 🔗

Co-authored-by: Aviv Keller <[email protected]>
Signed-off-by: Dario Piotrowicz <[email protected]>
@AugustinMauroy AugustinMauroy added the github_actions:pull-request Trigger Pull Request Checks label May 14, 2025
@github-actions github-actions bot removed the github_actions:pull-request Trigger Pull Request Checks label May 14, 2025
@avivkeller avivkeller added this pull request to the merge queue May 15, 2025
Merged via the queue into nodejs:main with commit fd87584 May 15, 2025
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants