Skip to content

ci: enforce lint + strict tsc + tests + build on every PR (R22) - #25

Merged
abhinav-phi merged 1 commit into
mainfrom
abhinav-pr/26-ci-workflow
Aug 29, 2026
Merged

ci: enforce lint + strict tsc + tests + build on every PR (R22)#25
abhinav-phi merged 1 commit into
mainfrom
abhinav-pr/26-ci-workflow

Conversation

@abhinav-phi

Copy link
Copy Markdown
Owner

Problem

No CI/CD at all (audit Build & Deploy + LOW items): lint, type-check, tests and the production build all ran only when a developer remembered — Rule R22 ("build before push") was pure discipline, not enforcement. A red-breaking commit could land on main silently.

Discovery while wiring this up

npm run lint was already failing with 5 no-explicit-any errors — all in the two Deno edge functions (verify-anchor-receipt, verify-wallet-link). Their /* deno-lint-ignore-file */ directive silences Deno's linter, not ESLint, which scans them because they live inside the repo. The anys there are deliberate (raw JSON-RPC / PostgREST JSON boundaries) and those files are excluded from the Vite typecheck — they're type-checked by Deno at deploy time. CI would have been DOA without resolving this.

Fix

.github/workflows/ci.yml — one verify job, four gates, on every PR and push to main:

  1. npm ci (Node 20, npm cache)
  2. npm run lint — errors fail; the 8 pre-existing warnings stay non-blocking
  3. npx tsc --noEmit -p tsconfig.app.json — the strict-mode gate
  4. npm test + npm run build

supabase/functions/*/index.ts — added a scoped, justified /* eslint-disable @typescript-eslint/no-explicit-any */ to both edge functions (raw JSON boundary typing is intentional; rationale documented in the comment). Lint is now 0 errors, 8 warnings and exits 0.

Files Changed

  • .github/workflows/ci.yml — new CI workflow.
  • supabase/functions/verify-anchor-receipt/index.ts, supabase/functions/verify-wallet-link/index.ts — scoped eslint-disable for Deno files.

Verification

  • npm run lint0 errors (8 warnings, exit 0).
  • npx tsc --noEmit -p tsconfig.app.jsonexit 0; npm test35 tests passing across 5 files (incl. the 7 new CSV parser tests).
  • First run of the workflow will validate the runner itself.

Add a GitHub Actions workflow with four gates (npm ci, eslint, strict typecheck,
vitest, production build) on PRs and pushes to main. Unblocks lint, which was
failing with no-explicit-any errors in the two Deno edge functions: their
deno-lint directive silences Deno's linter, not ESLint — add a scoped,
documented eslint-disable (raw JSON boundaries are deliberate; Deno type-checks
these at deploy time).
@vercel

vercel Bot commented Aug 29, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
authchain Ready Ready Preview Aug 29, 2026 1:42pm

@abhinav-phi
abhinav-phi merged commit 09e60f4 into main Aug 29, 2026
3 checks passed
@abhinav-phi
abhinav-phi deleted the abhinav-pr/26-ci-workflow branch August 29, 2026 13:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant