From 09d1c4fbaee331e6923601b7737b1a278761e05c Mon Sep 17 00:00:00 2001 From: Kenan Salim Date: Tue, 16 Jun 2026 00:42:33 +0300 Subject: [PATCH] =?UTF-8?q?ci(frontend):=20add=20Frontend=20CI=20=E2=80=94?= =?UTF-8?q?=20typecheck=20+=20Vitest=20render=20contracts=20(G-3)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The frontend had no test CI (only docker.yml), so the render-contract suite (#163/#164) didn't gate PRs. This runs typecheck + vitest on every PR so a server error can't silently regress to 'No data' (#1336/#1337) and null can't render as 0 (#1337) without failing the build. - corepack honors packageManager pnpm@10.33.0 (no version drift). - actions SHA-pinned, persist-credentials: false. - typecheck + test are blocking (both green on main); lint is report-only until 3 pre-existing 'setState in effect' errors on main are cleared, then it flips to blocking (the ratchet). Signed-off-by: Kenan Salim --- .github/workflows/frontend-ci.yml | 38 +++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/frontend-ci.yml diff --git a/.github/workflows/frontend-ci.yml b/.github/workflows/frontend-ci.yml new file mode 100644 index 0000000..35acc8b --- /dev/null +++ b/.github/workflows/frontend-ci.yml @@ -0,0 +1,38 @@ +name: Frontend CI + +# This repo IS the frontend (separate from constructorfabric/insight) — runs on +# every PR. Implements G-3: the Vitest render-contract suite must gate the UI so +# a server error never silently regresses to "No data" (#1336/#1337). +on: + pull_request: + push: + branches: [main] + +jobs: + build-and-test: + runs-on: ubuntu-latest + steps: + # SHA-pinned + no token persistence (supply-chain hardening). + - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 + with: + persist-credentials: false + - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 + with: + node-version: '20' + # corepack honors packageManager: pnpm@10.33.0 in package.json (no version drift). + - name: Enable corepack (pnpm) + run: corepack enable + - name: Install dependencies + run: pnpm install --frozen-lockfile + + # Blocking gates — both green on main today. + - name: Typecheck + run: pnpm run typecheck + - name: Unit tests (Vitest — render contracts) + run: pnpm run test + + # Report-only until the 3 pre-existing lint errors on main are cleared, + # then drop continue-on-error to make it blocking (the ratchet). + - name: Lint (report-only for now) + run: pnpm run lint + continue-on-error: true