From 31f77b35366f1c21a642255d7cefde3f3c83a792 Mon Sep 17 00:00:00 2001 From: Max Ghenis Date: Mon, 10 Aug 2026 17:24:51 -0400 Subject: [PATCH] Guard the PolicyEngine site shell in CI Asserts the brand, the Research / Model / API / Donate nav labels, and the five site footer links stay present, so a future change cannot silently drop the shell (policyengine.org's zone-shell audit would only catch it a day later in production). Co-Authored-By: Claude Fable 5 --- .github/workflows/pull_request.yaml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/.github/workflows/pull_request.yaml b/.github/workflows/pull_request.yaml index 284daee..53a5a0a 100644 --- a/.github/workflows/pull_request.yaml +++ b/.github/workflows/pull_request.yaml @@ -19,3 +19,24 @@ jobs: run: ruff check src tests - name: Test run: pytest -q + + dashboard-build: + name: Dashboard build and site-shell check + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: oven-sh/setup-bun@v2 + - name: Install deps + working-directory: dashboard + run: bun install --frozen-lockfile + - name: Build + working-directory: dashboard + run: bun run build + - name: Assert the PolicyEngine site shell is in the built HTML + working-directory: dashboard + run: | + html=.next/server/app/index.html + for needle in "PolicyEngine" ">Research<" ">Model<" ">API<" ">Donate<" "About us" "Developer tools" "Privacy policy" "Terms and conditions"; do + grep -qF -- "$needle" "$html" || { echo "MISSING from built HTML: $needle"; exit 1; } + done + echo "Site shell present (brand, nav labels, footer links)."