Repository navigation
test(smoke): add astro build verification for all demos and templates - #361
Conversation
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.
|
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
emdash-playground | d2b7da4 | Apr 07 2026, 06:58 PM |
@emdash-cms/admin
@emdash-cms/auth
@emdash-cms/blocks
@emdash-cms/cloudflare
emdash
create-emdash
@emdash-cms/gutenberg-to-portable-text
@emdash-cms/x402
@emdash-cms/plugin-ai-moderation
@emdash-cms/plugin-atproto
@emdash-cms/plugin-audit-log
@emdash-cms/plugin-color
@emdash-cms/plugin-embeds
@emdash-cms/plugin-forms
@emdash-cms/plugin-webhook-notifier
commit: |
There was a problem hiding this comment.
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 buildfor 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), { |
There was a problem hiding this comment.
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.
| 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}`, { |
…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.
What does this PR do?
The smoke tests only ran
astro devfor 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 buildfor 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
Checklist
pnpm typecheckpassespnpm --silent lint:json | jq '.diagnostics | length'returns 0pnpm testpasses (or targeted tests for my change)pnpm formathas been runAI-generated code disclosure