Repository navigation
ci: run the built Worker and request every page - #186
Merged
Merged
Conversation
1 task done
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.
What and why
v0.7.0 passed CI and the Workers build, then threw on every request in production (Next 16.4 with OpenNext 1.20.10, fixed in #184). Nothing in CI ever ran the built Worker, so a green
next buildwas all we knew.The
verifyjob now builds withopennextjs-cloudflare build(it runsnpm run builditself, so the plain build step is gone), starts the result withwrangler devand requests:/sitemap.xml, so a new tool is covered without touching CIog:imageeach page links to (the tool images have a hash in their path, so they're read from the page rather than guessed)/sitemap.xml,/robots.txt, and a missing page, which has to be 404Any other status, or a
[wrangler:error]line in the log, fails the step and prints the wrangler output. No secrets are needed, so it works on fork PRs too. It's in the same job, soverifystays the only check to look at.CONTRIBUTING mentions the new step and how to reproduce a failure with
npm run preview.How I tested this
Ran the exact step script locally on Node 22 after
npm ciandopennextjs-cloudflare build:develop(315e056): all 6 pages and their 6 images return 200,/no-such-pagereturns 404, step passes./sitemap.xml,/robots.txtand the missing page all return 500 withUnexpected loadManifest(/.next/server/preview-props.json) call!, which is the production error, and the step fails.On GitHub's runner (this PR's CI) the step made the same 15 requests and passed.
Type of change
Notes for reviewers
verifytook 71 s on this PR. The last four runs ondeveloptook 40 to 60 s, so it adds about 15 to 30 s. That's low because the separatenext buildstep is gone.