Skip to content

test(smoke): add astro build verification for all demos and templates - #361

Merged
ascorbic merged 1 commit into
mainfrom
fix/smoke-test-build-verification
Apr 7, 2026
Merged

ascorbic merged 1 commit into
mainfrom
fix/smoke-test-build-verification

Conversation

@ascorbic

@ascorbic ascorbic commented Apr 7, 2026

Copy link
Copy Markdown
Member

What does this PR do?

The smoke tests only ran astro dev for each site in the matrix. Dev mode uses Vite's on-demand compilation and never invokes the adapter's build pipeline, so build failures (e.g. in the cloudflare or playground demos) passed CI undetected.

This adds a "Site build verification" suite that runs astro build for every runtime site in the matrix before the existing dev-server runtime tests.

Also bumps the smoke test CI job timeout from 15 to 30 minutes to accommodate the additional build time.

Type of change

  • Tests

Checklist

AI-generated code disclosure

  • This PR includes AI-generated code

Smoke tests only ran astro dev, which uses Vite's on-demand compilation
and never invokes the adapter build pipeline. Build failures in
cloudflare/playground demos (or any adapter-dependent site) passed CI
undetected. Add a build verification suite that runs astro build for
every site in the matrix before the existing runtime tests.

Bumps smoke test CI timeout from 15 to 30 minutes to accommodate.
Copilot AI review requested due to automatic review settings April 7, 2026 18:56
@changeset-bot

changeset-bot Bot commented Apr 7, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: d2b7da4

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Apr 7, 2026 •

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
emdash-playground d2b7da4 Apr 07 2026, 06:58 PM

@pkg-pr-new

pkg-pr-new Bot commented Apr 7, 2026

Copy link
Copy Markdown

Open in StackBlitz

@emdash-cms/admin

npm i https://pkg.pr.new/@emdash-cms/admin@361

@emdash-cms/auth

npm i https://pkg.pr.new/@emdash-cms/auth@361

@emdash-cms/blocks

npm i https://pkg.pr.new/@emdash-cms/blocks@361

@emdash-cms/cloudflare

npm i https://pkg.pr.new/@emdash-cms/cloudflare@361

emdash

npm i https://pkg.pr.new/emdash@361

create-emdash

npm i https://pkg.pr.new/create-emdash@361

@emdash-cms/gutenberg-to-portable-text

npm i https://pkg.pr.new/@emdash-cms/gutenberg-to-portable-text@361

@emdash-cms/x402

npm i https://pkg.pr.new/@emdash-cms/x402@361

@emdash-cms/plugin-ai-moderation

npm i https://pkg.pr.new/@emdash-cms/plugin-ai-moderation@361

@emdash-cms/plugin-atproto

npm i https://pkg.pr.new/@emdash-cms/plugin-atproto@361

@emdash-cms/plugin-audit-log

npm i https://pkg.pr.new/@emdash-cms/plugin-audit-log@361

@emdash-cms/plugin-color

npm i https://pkg.pr.new/@emdash-cms/plugin-color@361

@emdash-cms/plugin-embeds

npm i https://pkg.pr.new/@emdash-cms/plugin-embeds@361

@emdash-cms/plugin-forms

npm i https://pkg.pr.new/@emdash-cms/plugin-forms@361

@emdash-cms/plugin-webhook-notifier

npm i https://pkg.pr.new/@emdash-cms/plugin-webhook-notifier@361

commit: d2b7da4

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds build-time validation to the existing smoke-test matrix so CI catches Astro adapter/bundling failures that don’t appear when only running astro dev.

Changes:

  • Add a new sequential Vitest suite that runs pnpm exec astro build for each runtime demo/template prior to runtime smoke checks.
  • Rename/clarify the existing suite as “Site runtime verification” (still runs astro dev + HTTP checks).
  • Increase the CI smoke-test job timeout to accommodate the added build step.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
packages/core/tests/integration/smoke/site-matrix-smoke.test.ts Adds per-site astro build verification before the existing runtime smoke matrix.
.github/workflows/ci.yml Extends smoke test job timeout to 30 minutes.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

error instanceof Error && "stderr" in error ? (error as { stderr: string }).stderr : "";
const stdout =
error instanceof Error && "stdout" in error ? (error as { stdout: string }).stdout : "";
throw new Error(`${site.name} build failed:\n\n${stderr || stdout}`.slice(0, 5000), {

Copilot AI Apr 7, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The failure message currently prefers stderr || stdout and then .slice(0, 5000), which can hide useful context (e.g., when both streams have content or the actual error is at the end of the log). Consider including both stdout+stderr (when present) and truncating from the end (tail) instead of the beginning so the most relevant build error output is preserved.

Suggested change
throw new Error(`${site.name} build failed:\n\n${stderr || stdout}`.slice(0, 5000), {
const outputSections = [
stdout ? `stdout:\n${stdout}` : "",
stderr ? `stderr:\n${stderr}` : "",
].filter(Boolean);
const combinedOutput = outputSections.join("\n\n");
const tailedOutput =
combinedOutput.length > 5000 ? combinedOutput.slice(-5000) : combinedOutput;
throw new Error(`${site.name} build failed:\n\n${tailedOutput}`, {

Copilot uses AI. Check for mistakes.
@ascorbic
ascorbic merged commit 885df3b into main Apr 7, 2026
31 checks passed
@ascorbic
ascorbic deleted the fix/smoke-test-build-verification branch April 7, 2026 19:07
fmhall pushed a commit to fmhall/emdash that referenced this pull request Apr 13, 2026
…emdash-cms#361)

Smoke tests only ran astro dev, which uses Vite's on-demand compilation
and never invokes the adapter build pipeline. Build failures in
cloudflare/playground demos (or any adapter-dependent site) passed CI
undetected. Add a build verification suite that runs astro build for
every site in the matrix before the existing runtime tests.

Bumps smoke test CI timeout from 15 to 30 minutes to accommodate.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants