* modernize kv-asset-handler so that we can test is in Node 22+
* suggestion from Vic
* fix exports on the kv-asset-handler package.json
* move kv-asset-handler tests back into main test run
* only test on Node 22
Node 20 has been in Maintenance for over a year and will become end of life in April 2026.
Node 22 entered Maintenance in October and is arguably the most stable and supported version right now.
* also test packages on Node 20 and 24
* really don't run interactive-dev tests on Windows
* remove redundant service-worker-mock
* wait for the old port to be closed
* Add resilience to reading and writing the dev registry files
* give prisma tests a bit longer to run
* fix: ensure that the `sourcemap-codec` library has been transformed correctly to be imported in workerd during Vitest runs
Prior to this the inline snapshot tests were failing because they use the `magic-string` library, which in turn relies upon the `sourcemap-codec` library.
This resulted in errors that look like:
```
Error running worker: SyntaxError: The requested module '@jridgewell/sourcemap-codec' does not provide an export named 'encode'
```
* refactor: run C3 e2e tests more easily locally and individually
* fixup! refactor: run C3 e2e tests more easily locally and individually
* move to-exist helper back to setup file
* rename the filtering env vars
* fixup! refactor: run C3 e2e tests more easily locally and individually
* fix c3 e2e ci groups
* remove unnecessary step
* skip gatsby on yarn
* Run windows tests in a normal directory
* skip Workers tests on Windows
* match the previous test descriptions
In the `run-c3-e2e` GH Action we compute various things from the inputs. In particular using `experimental` and `quarantine`.
But it seems that these are converted to strings rather than booleans, so we cannot simple check the truthy state of `inputs.quarantine`, for example since this might have the value `"false"`, which is truthy.
* chore: include C3 e2e logs in turbo outputs
* ci: update C3 e2e tests to use `actions/upload-artifacts@4`
* ci: run c3 e2e tests on all PRs
These no longer require API tokens to pass and when cached are very fast
* feat: add experimental Next.js, with Workers assets, template
This template uses the new `@opennextjs/cloudflare` adaptor.
* test: add support for e2e testing of experimental frameworks and workers
* ci: Run C3 experimental e2e tests in CI
* ci: remove unnecessary build step from C3 e2e job
Not only is this unnecessary, the cached does not even get used by the e2e step that follows
(probably because the env vars change) so it adds extra time to these jobs.
* add logging to c3 e2e test failures
* ci: write json test results to the correct directory
* test: do not run experimental next.js template e2e tests on Windows
This should remove the `WARN Issue while reading "/Users/***/dev/cloudflare/workers-sdk/.npmrc". Failed to replace env in config: ${NPM_PUBLISH_TOKEN}
` warning we always
* ci: update actions/checkout to v4
The new version stops using Node.js 16 which is causing warnings in our actions.
* ci: update actions/github-script to v7
This uses Node.js 20 rather than 16
* ci: update pnpm/action-setup to v7
This version uses Node.js 20 rather than 16
* ci: update actions/setup-node to v4
This version uses Node.js v20 rather than v16
fix(create-cloudflare): fix turbo caching for C3 e2e tests
It seems that currently turbo caching doesn't work properly for
C3 e2e tests, due to some incomplete config setup.
This PR fine tunes the config in `turbo.json` so that caching
works properly again.
---------
Co-authored-by: Carmen Popoviciu <cpopoviciu@cloudflare.com>
* [C3] fix: commit changes when framework cli initialized the git repository
* add SAVE_DIFFS to .env.example
* re-introduce test:e2e:x scripts (as they are convenient aliases for local development)
* quarantine Analog
* rename task
* Run builds before all C3 e2e tests
---------
Co-authored-by: Samuel Macleod <smacleod@cloudflare.com>
* C3: Generate migration diffs for framework templates
* Fix an issue where --no-git flag wasn't being respected
* Generate and store framework diffs during e2e
* Remove trash
* Fix issues with create-* tools that commit by default
* Skip diffs in quarantine and add placeholder directory for c3-framework-diffs
* Invert check for storing diffs
* Fix check for quarantine skip
* Try making if conditions work in github actions
* Fix conditional
* Git checkout PR branch on c3 e2e job
* test
* Refactor to a separate action for creating docs PR thats only run on release branch
* Responding to PR feedback
* Addressing more PR feedback
* Use newly created access token
* Quarantine hono on windows
* Addressing PR feedback
* Run prerelease using global pnpm
* Remove pnpm & yarn version import
* turbo-ify
* pnpm windows
* fixups
* split in JS
* fixups
* Actually run the tests 😅
* composite matrix
* chore: update repo to use pnpm 9.1.1
* chore: update GH Actions to use pnpm 9.1.1
* chore: use install-dependencies custom action across all GH workflows
Also moves the setup of the TURBO cache into that action.
* ci: easy pre-releases for new packages
* fixup! ci: easy pre-releases for new packages
Expose ACTIONS_RUNTIME_TOKEN and ACTIONS_RESULTS_URL variables
* fixup! ci: easy pre-releases for new packages
Switch to `workers-sdk` object in `package.json`
* fixup! ci: easy pre-releases for new packages
Remove extraneous `|` in pre-release comment
* fixup! ci: easy pre-releases for new packages
Simplify validation/extraction of `githubPullRequestNumber`
* fixup! ci: easy pre-releases for new packages
Use `forEach` instead of `for of`
* fixup! ci: easy pre-releases for new packages
Explain why we need custom action for extracting action variables
* fixup! fixup! ci: easy pre-releases for new packages
* fix: ensure C3 shell scripts work on Windows
Our use of `shell-quote` was causing problems on Windows where it was
escaping character (such as `@`) by placing a backslash in front.
This made Windows think that such path arguments, were at the root.
For example, `npm install -D @cloudflare/workers-types` was being converted to
`npm install -D \@cloudflare/workers-types`, which resulted in errors like:
```
npm ERR! enoent ENOENT: no such file or directory, open 'D:\@cloudflare\workers-types\package.json'
```
Now we just rely directly on the Node.js `spawn` API to avoid any shell quoting
concerns. This has resulted in a slightly less streamlined experience for people
writing C3 plugins, but has the benefit that the developer doesn't have to worry
about quoting spawn arguments.
Closes https://github.com/cloudflare/workers-sdk/issues/4282
* C3 e2e - test on CI with Windows + pnpm
* C3 e2e - clean up test projects according to their type
Previously we only deleted Pages projects - in fact we were trying to delete
the Hono (non-Pages) Worker as a Pages project.
Now we delete the project based on its type.
* C3 - framework template fixes for Windows
- do not use bash-style environment variable setting in Docusaurus scripts
- do not run TTY interactive e2e tests on Windows
* C3 e2e - make cleaning up e2e test files more resilient
* C3 - update Nuxt template to avoid requiring Windows incompatible shell environment variable
* C3 e2e - remove noise from expected test errors
* C3 e2e - Only cleanup workers and projects that are over 1 hour old
These e2e test workers and projects should be cleaned up as part of the normal test completion.
But if the test crashes they may be left orphaned.
This change ensures that we do not clean up projects to early while they are still being used.
* C3 e2e - only clean up test projects once per day at 3am
* C3 e2e - fix commit message tests on Windows
* C3 e2e - recreate test folders for each e2e retry
Previously we were reusing folders after clearing them when retrying a
failed test. But this could lead to problems, especially on Windows where
clearing out the folder did not always work.
* C3 e2e - bump test timeout longer
* C3 e2e - do not run C3 e2e tests on unsupported OSes
* C3 e2e - store e2e logs separately by OS
* C3 e2e - Retry some of the checks a few times to reduce flakiness
* C3 e2e - Record vitest results as a json artifact for downloading
* C3 e2e - disable global caches for package managers
This commit uses environment variables to tell package managers to put
cached files in a local directory rather than a global shared one, which
can cause problems with race conditions when running multiple installs
at the same time.
* C3 e2e - don't cancel other matrix jobs if one fails
It is a false optimization to cancel jobs that are likely to pass when
another job flakes out.
* ci: retry the external-durable-objects-app fixture if it flakes
* C3 e2e - drop docusaurus and react tests
These jobs tend to flake out and are not providing much of a useful signal.
* ci: skip fixture tests that exercise the "dev registry"
Reenable when https://github.com/cloudflare/workers-sdk/pull/4241 lands and improves reliability of this test.
* C3 - ensure shell commands in logging are reasonably quoted
C3 often outputs log messages to the user of commands that are being
executed. Users tend to cut and paste these into their terminal to run
themselves. This makes sure that these are likely to just work went
pasted into their shell.
* fixup! C3 - ensure shell commands in logging are reasonably quoted
* fixup! C3 - ensure shell commands in logging are reasonably quoted
* C3: Dont show animated spinners in non-interactive terminals
* C3: Write e2e output to log files instead of stdout
* C3: Upload e2e logs as artifacts
* Don't cleanup projects when importing helper
* Adding a .gitkeep to .e2e-logs
* Make per-pm folders
* Upload artifacts when e2e step fails
* Remove hack for testing failure
* Add shell to last step in e2e action
* Suppress console logs in case of error
* C3: Catch errors in quarantined e2e tests
* Address PR feedback
* fix lint issue
* Split up C3 workflow files and run quarantine e2es on pushed to main
* Pass accountId and token as inputs to e2e action
* Specify shell in github action
* Fix cleanup job trigger
* Allow quarantine tests to fail again
* Adding bun to pm detection
* Adding bun to pm e2e matrix
* Install bun in CI setup action
* Passing git flag through to nuxi
* Change astro template to basics
* C3: Add e2e coverage for pnpm and yarn
* Skipping some tests for debug purposes
* Fixing env variable passing to e2e process
* Change how we force package managers in e2e
* Create a job to cleanup e2e pages projects before running
* Add required env variables to cleanup job
* Consolidate temp directory creation logic
* debug cli tmp project creation
* Skip react and next for debug
* Re-enable all tests
* Running tests serially for debug
* Fix bug in cleanup
* Debug: limit to npm
* Update test account in c3 tests
* Lower the concurrency to help with rate limiting
* Fixing pnpm issues for react and next
* Configure dummy git user and limit runs to npm
* Add more logging
* Parse deployment url from c3 run output. Fix hono expectations