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)."