From ff0629462cdae70b74127e054d3b317344547576 Mon Sep 17 00:00:00 2001 From: siddharthd Date: Mon, 27 Jul 2026 23:23:32 +1000 Subject: [PATCH] fix(ci): generate the Prisma client before running tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The pipeline has been red on every run since at least ae0c34f. npm ci installs dependencies but the Prisma client is generated into src/generated/prisma, which is gitignored — so a fresh CI checkout has no client and anything importing src/lib/db.ts fails with 'Cannot find package @/generated/prisma/client' before a single assertion runs. prisma generate reads only the schema, so it needs no database and no secrets. Worth noting why this went unnoticed for a dozen commits: a pipeline that is always red carries no signal, so it stopped being read. --- .gitea/workflows/ci.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index bf42444..52cfe05 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -13,6 +13,15 @@ jobs: node-version: 22 - name: Install run: npm ci + # The Prisma client is generated into src/generated/prisma, which is + # gitignored — so a fresh checkout has no client and every test that + # reaches src/lib/db.ts dies on "Cannot find package + # '@/generated/prisma/client'". Schema-only, so it needs no database. + # Without this the pipeline had been red on every run since at least + # ae0c34f, which is how the failure stayed invisible: it looked like + # the normal colour. + - name: Generate Prisma client + run: npx prisma generate # Advisory until the pre-existing lint debt is cleared (2026-07-19: # ~20 errors across budget/insights/shared pages) — then make blocking. - name: Lint (advisory)