From dc66cf6a062e2b37d36586e5e92e120d28ae530b Mon Sep 17 00:00:00 2001 From: 3252a8 <3252a8@proton.me> Date: Tue, 2 Jun 2026 19:31:06 +0300 Subject: [PATCH] ci: guard demo settings manifest against drift Add a PR job that installs the backend deps and runs the settings-manifest drift guard, so a change to admin_settings_manifest.py without regenerating settingsManifest.generated.json fails CI instead of silently leaving the docs demo Settings screen stale. --- .github/workflows/ci.yml | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 027a381..3d550d9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,8 +1,8 @@ name: PR checks # Runs on pull requests into main (typically from dev) and into dev (typically -# from feature/* branches): lint + format checks and a no-push image build to -# prove the Docker images still build. +# from feature/* branches): lint + format checks, a demo settings-manifest +# drift guard, and a no-push image build to prove the Docker images still build. on: pull_request: @@ -56,6 +56,30 @@ jobs: run: npm run format:check working-directory: frontend + demo-manifest: + name: Demo settings manifest in sync + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.12" + cache: pip + cache-dependency-path: backend/requirements.txt + + - name: Install backend deps + pytest + run: pip install -r backend/requirements.txt pytest + + # Fails if admin_settings_manifest.py changed without regenerating the + # demo snapshot. Fix: `python scripts/export_settings_manifest.py` then + # `npx --prefix frontend prettier --write \ + # src/lib/webapp/settingsManifest.generated.json`, and commit the result. + - name: Check demo settings manifest is in sync + run: python -m pytest tests/test_settings_manifest_demo_sync.py -q + build: name: Docker build uses: ./.github/workflows/_docker-build-push.yml