ci: enforce lint + strict tsc + tests + build on every PR (R22) - #25
Merged
Conversation
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).
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
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
mainsilently.Discovery while wiring this up
npm run lintwas already failing with 5no-explicit-anyerrors — 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. Theanys 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— oneverifyjob, four gates, on every PR and push tomain:npm ci(Node 20, npm cache)npm run lint— errors fail; the 8 pre-existing warnings stay non-blockingnpx tsc --noEmit -p tsconfig.app.json— the strict-mode gatenpm test+npm run buildsupabase/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 lint→ 0 errors (8 warnings, exit 0).npx tsc --noEmit -p tsconfig.app.json→ exit 0;npm test→ 35 tests passing across 5 files (incl. the 7 new CSV parser tests).