ci(smoke): scaffold + bring up --next project on every PR#82
Closed
pascal-klesse wants to merge 1 commit intomainfrom
Closed
ci(smoke): scaffold + bring up --next project on every PR#82pascal-klesse wants to merge 1 commit intomainfrom
pascal-klesse wants to merge 1 commit intomainfrom
Conversation
The friction log on `lt fullstack init --next` keeps surfacing the same class of mechanical bug: P1000 auth errors from leftover Postgres state, missing `pg_uuidv7` extension, empty `datasource.url`, hard-coded `container_name:` clashes across workspaces, `prepare:schema` not run before `prisma:generate`. None of these are caught by the existing unit tests (jest, in-process) — they only reproduce when the generated workspace actually boots against Postgres. So they reach humans first. This adds a GitHub Actions workflow that runs on every PR and every push to main. It builds the CLI from the PR's source (so the test exercises the actual code under review, not whatever is on npm), `npm pack`s + globally installs the resulting tarball, then scaffolds a real `--next` workspace into `$RUNNER_TEMP` and walks it through the documented bring-up sequence: bun install bun run setup # writes .env from .env.example docker compose up -d --build postgres <wait for healthcheck> bun run prepare:schema # materialise feature-gated migrations bun run prisma:generate bun run prisma:migrate bun run build The bring-up matches the order from the workspace's `.claude/QUICKSTART.md` (added in PR #81). Boot/health-check via `bun run dev` is intentionally out of scope for now — the migrate-and-build step already catches the bulk of the bring-up regressions, and adding a live server would just make the workflow flakier without much added coverage. Notes / tradeoffs: - The custom Postgres image (compiles `pg_uuidv7` from source) takes ~2-3 min on a cold runner. Pre-build / cache is deliberately deferred; optimise once the workflow has shaken out. - Concurrency group cancels superseded runs on the same ref so a fast follow-up commit doesn't queue a full rebuild behind the previous one. - On failure: dumps `docker compose ps` + last 200 lines of postgres logs inline, then uploads the full generated workspace (minus `node_modules` / `.git`) as an artifact for 7 days so the bring-up can be reproduced after the runner is recycled. - Teardown runs `docker compose down -v` regardless of outcome so re- running the same step locally with `act` starts from a clean slate. No CLI source changes; only `.github/workflows/init-smoke.yml`. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Member
Author
|
Closing — was based on a misunderstanding of the brief (smoke-test workflow rather than the requested 'rename auto-run' fix). Re-opening as a separate PR scoped to the rename topic. |
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.
Summary
The friction log on
lt fullstack init --nextkeeps surfacing the same class of mechanical bug — P1000 auth errors from leftover Postgres state, missingpg_uuidv7extension, emptydatasource.url, hard-codedcontainer_name:clashes across workspaces,prepare:schemanot run beforeprisma:generate. None of these are caught by the existing jest unit tests because they only reproduce when the generated workspace actually boots against Postgres. So they reach humans first.This PR adds a GitHub Actions workflow (
.github/workflows/init-smoke.yml) that runs on every PR and every push tomain. It builds the CLI from the PR's source (so the test exercises the actual code under review, not whatever is on npm),npm packs + globally installs the tarball, then scaffolds a real--nextworkspace into$RUNNER_TEMPand walks it through the documented bring-up.What the workflow does
npm install,npm run build(which already runs lint + tests + compile + copy-templates).npm pack+npm install -g ./<tarball>. This exercises the same install surface real users get (bin/lt,build/,files[]), not the dev-mode ts-node path.$RUNNER_TEMP:.claude/QUICKSTART.md(added in fix(fullstack init --next): replace stale root README/CLAUDE.md, suppress noisy noConfirm hint #81):docker compose down -vregardless of outcome.Notes / tradeoffs
bun run dev &+/health/ready+/api/openapi.jsonsmoke later once this workflow has shaken out.pg_uuidv7from source on first build. Pre-build / cache is deliberately deferred — that's an optimisation for after we have signal on stability.docker compose ps+ last 200 lines ofpostgreslogs inline, then uploads the full generated workspace (minusnode_modules/.git) as an artifact for 7 days so the bring-up can be reproduced after the runner is recycled.nest-basehaving dropped the hard-codedname:/container_name:(commit25963e0), so the compose project is auto-derived from the workspace dir and parallel runs don't clash..github/workflows/init-smoke.yml. No CLI source changes.Test plan
npm run lint— clean (pre-push hook)npm test— 153 passed (pre-push hook)yq eval '.' .github/workflows/init-smoke.yml)mainoflenneTech/nest-base. Any flake or unexpected failure should be triaged before merge.🤖 Generated with Claude Code