ci: build + boot the Docker image on every PR (#212 follow-up)#221
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Adds a docker-smoke job to ci.yml: builds the self-host image (amd64,
native), boots it, and polls /api/health until {"ok":true}; then runs
`caddy validate` on both Caddyfile and Caddyfile.lan with a blank
ACME_EMAIL. The existing jobs only build/boot the SPA+server from the
SOURCE tree, so image-specific failure modes (multi-stage npm ci --omit=dev,
the COPY set, baked NODE_ENV=production, Caddyfile parsing) were never
exercised — that is why issue #212 shipped five such bugs through green CI.
This job would have caught four of the five automatically (build, boot
crash x2, empty-email Caddyfile parse).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Why
CI never built or ran the Docker image —
docker-publish.ymlbuilds it only on a release tag (and onlybuild-push, never boots it), and the existingbuild-self-hostjob bootsnpm run servefrom the source tree, not the image. That blind spot is exactly why issue #212 shipped five image-specific bugs through green CI.What
A
docker-smokejob inci.yml(runs on every PR + push to main):docker build, amd64 native — ~2 min).docker run) and poll/api/healthuntil{"ok":true}.CaddyfileandCaddyfile.lanviacaddy validatewith a blankACME_EMAIL.Coverage vs the #212 bugs
npm ciexit 127COPY packages/→ boot crashSELF_HOSTEDproduction boot guardemailCaddyfile parse errorbind/default_sni)So 4 of 5 are now caught automatically; the 5th has its config validated.
Verification
This PR's own CI runs the new job — that's the proof. (My local sandbox can't reach Docker; GitHub's runner can.) actionlint is clean on the new job; the two warnings it reports are pre-existing on the
build-self-hoststep (line 205), untouched here.Not auto-merging.
🤖 Generated with Claude Code