ci: add lint/test/format checks and deploy gate#27
Merged
nathanialhenniges merged 7 commits intomainfrom May 7, 2026
Merged
Conversation
Mirror fangdash CI/CD discipline before production deploys. CI changes: - Add bun install cache - Run typecheck, test, lint, format:check, build (in that order) - Drop non-blocking npm audit (Dependabot covers it) - Add typecheck, lint, format, format:check root scripts - Install @biomejs/biome (referenced by biome.json but missing) New deploy.yml: - Trigger via workflow_run gated on CI success on main - Runs bun run deploy (Alchemy -> Cloudflare) under production environment - Smoke test /api/health post-deploy, fails if non-ok Server: - Add GET /api/health for the smoke test Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Important Review skippedToo many files! This PR contains 238 files, which is 88 over the limit of 150. ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (238)
You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
- Migrate biome.json to v2 schema (ignore -> includes, organizeImports -> assist) - Demote pre-existing rule violations (a11y, noNonNullAssertion, noImgElement, noArrayIndexKey, etc.) to "warn" so CI can enforce on new code without blocking on legacy debt; followup work to address them - Disable biome on .css files (Tailwind directives are not parsed) - Auto-format all 236 files with biome (tab indent, double quotes, semicolons) - Pin @vitejs/plugin-react@^5 (v6 imports vite/internal which Vite 7 does not export) - Refresh bun.lock for newly added @biomejs/biome devDep Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…e6d8 # Conflicts: # apps/web/src/app/admin/appearance/page.tsx # apps/web/src/app/admin/settings/page.tsx # apps/web/src/components/public/public-page.tsx # apps/web/src/lib/login-bg.ts # packages/api/src/routers/settings.ts
…e6d8 # Conflicts: # apps/docs/package.json # apps/server/package.json # apps/web/package.json # apps/web/src/app/admin/account/page.tsx # apps/web/src/app/admin/appearance/page.tsx # apps/web/src/components/public/public-page-content.tsx # bun.lock # packages/api/package.json # packages/auth/package.json # packages/auth/src/index.ts # packages/db/package.json # packages/email/package.json # packages/env/package.json # packages/infra/package.json # packages/ui/package.json # packages/validators/package.json
…e6d8 # Conflicts: # apps/docs/content/docs/guide/meta.json
…xcludes - Use optional chaining for selectedConnection/selectedContact in useEffect deps; Next 16 build's tsc was rejecting nullable.id/.isRead access - Exclude apps/docs/out, .next build artifacts from biome
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
Bring CI/CD parity with
mrdemonwolf/fangdash. Before this PR, CI only rancheck-types+buildand deploys were manual with no gate. Nowmainis gated by lint/test/format/typecheck/build, and Cloudflare deploys auto-trigger on green CI with a/api/healthsmoke test.Changes
CI (
.github/workflows/ci.yml)actions/checkout@v6,oven-sh/setup-bun@v2.1.3withbun-version-file: package.json,actions/cache@v5for~/.bun/install/cache.npm auditstep (Dependabot covers vulnerability scanning).New
.github/workflows/deploy.ymlworkflow_runtrigger gated on CI success onmain.deploywithcancel-in-progress: true.environment: productionso env-scoped secrets resolve and the deploy shows in the Environments UI.bun run deploy(Alchemy → Cloudflare).curl -fsS ${NEXT_PUBLIC_SERVER_URL}/api/health, fails the job if response does not contain"status":"ok".Server (
apps/server/src/index.ts)GET /api/healthreturning{ status: "ok" }for the post-deploy smoke test.Root
package.jsontypecheck,lint,format,format:checkscripts.@biomejs/biomedevDep (was referenced bybiome.jsonbut never installed).Reviewer notes
productionGitHub Environment must hold these secrets before the first auto-deploy:CLOUDFLARE_API_TOKEN,CLOUDFLARE_ACCOUNT_ID,ALCHEMY_PASSWORD,BETTER_AUTH_SECRET,BETTER_AUTH_URL,NEXT_PUBLIC_SERVER_URL,CORS_ORIGIN, plus any wallet secrets in use.NEXT_PUBLIC_SERVER_URLmust point at the host that exposes/api/health(the worker, not the web app) for the smoke test to succeed.bun run format+ fix lint locally and follow up.Test plan
Deployworkflow auto-triggers viaworkflow_runand the smoke test hits/api/healthsuccessfully.mainand confirmDeploydoes NOT run.🤖 Generated with Claude Code