Standalone frontend: no-walk paths.py, own Dockerfile, own CI
paths.py drops the sibling-directory walk (frontend is now the repo
root: static/ and content/ are its own subdirectories, no more
sibling walk needed). New Dockerfile (much smaller deps -- fastapi,
uvicorn, httpx, jinja2, PyYAML -- no entrypoint script needed at all,
frontend has no migrations/pre-boot logic).
content/ is a committed starter copy for now, not yet real cross-repo
vendoring from thermograph-copy (that repo doesn't exist yet) -- noted
in paths.py's own docstring.
Real, known gap flagged rather than silently skipped: this process
cannot boot standalone (content.register() fetches the IndexNow key
from backend at import time with no retry, by design), so build.yml
only verifies the image builds, not a live boot+healthz check -- that
needs a genuine cross-repo contract-test job (booting a real backend
too), separate follow-up work. Same reason tests/ doesn't run here yet
(its conftest.py still imports backend's own test fixtures via a
sibling path that no longer exists) -- noted directly in the file.
2026-07-21 22:59:29 +00:00
|
|
|
name: Build check
|
|
|
|
|
|
|
|
|
|
# Proves the split Dockerfile actually builds (repo-split Stage 7b) -- NOT a
|
|
|
|
|
# live boot+healthz check. content.register() fetches the IndexNow key from
|
|
|
|
|
# backend at import time with no retry (documented Stage 4 behavior,
|
|
|
|
|
# unchanged here); without a real, reachable backend this process crashes
|
|
|
|
|
# immediately on import, by design -- so a standalone boot check would either
|
|
|
|
|
# be fake (skip the real import path) or require checking out and booting
|
|
|
|
|
# thermograph-backend too. That's the real fix (a genuine cross-repo
|
|
|
|
|
# contract-test job, same pattern the original repo-split plan already
|
|
|
|
|
# scoped for the /cell + ETag contract), not yet built -- flagged as a real
|
|
|
|
|
# gap, not silently skipped. Full pytest-suite migration is separate,
|
|
|
|
|
# deferred follow-up work too, same category as thermograph-copy's deferred
|
|
|
|
|
# vendoring.
|
2026-07-22 19:18:36 +00:00
|
|
|
#
|
|
|
|
|
# workflow_call added alongside `dev` on both push/pull_request filters
|
|
|
|
|
# (dev-branch flow, mirroring the monorepo's build.yml): pr-build.yml (PRs
|
|
|
|
|
# into dev) and deploy-dev.yml (pushes to dev) both `uses:` this file as
|
|
|
|
|
# their shared build gate, same build-only behavior either way -- direct
|
|
|
|
|
# push/PR-to-main triggers are unchanged.
|
Standalone frontend: no-walk paths.py, own Dockerfile, own CI
paths.py drops the sibling-directory walk (frontend is now the repo
root: static/ and content/ are its own subdirectories, no more
sibling walk needed). New Dockerfile (much smaller deps -- fastapi,
uvicorn, httpx, jinja2, PyYAML -- no entrypoint script needed at all,
frontend has no migrations/pre-boot logic).
content/ is a committed starter copy for now, not yet real cross-repo
vendoring from thermograph-copy (that repo doesn't exist yet) -- noted
in paths.py's own docstring.
Real, known gap flagged rather than silently skipped: this process
cannot boot standalone (content.register() fetches the IndexNow key
from backend at import time with no retry, by design), so build.yml
only verifies the image builds, not a live boot+healthz check -- that
needs a genuine cross-repo contract-test job (booting a real backend
too), separate follow-up work. Same reason tests/ doesn't run here yet
(its conftest.py still imports backend's own test fixtures via a
sibling path that no longer exists) -- noted directly in the file.
2026-07-21 22:59:29 +00:00
|
|
|
|
|
|
|
|
on:
|
|
|
|
|
push:
|
2026-07-22 19:18:36 +00:00
|
|
|
branches: [main, dev]
|
Standalone frontend: no-walk paths.py, own Dockerfile, own CI
paths.py drops the sibling-directory walk (frontend is now the repo
root: static/ and content/ are its own subdirectories, no more
sibling walk needed). New Dockerfile (much smaller deps -- fastapi,
uvicorn, httpx, jinja2, PyYAML -- no entrypoint script needed at all,
frontend has no migrations/pre-boot logic).
content/ is a committed starter copy for now, not yet real cross-repo
vendoring from thermograph-copy (that repo doesn't exist yet) -- noted
in paths.py's own docstring.
Real, known gap flagged rather than silently skipped: this process
cannot boot standalone (content.register() fetches the IndexNow key
from backend at import time with no retry, by design), so build.yml
only verifies the image builds, not a live boot+healthz check -- that
needs a genuine cross-repo contract-test job (booting a real backend
too), separate follow-up work. Same reason tests/ doesn't run here yet
(its conftest.py still imports backend's own test fixtures via a
sibling path that no longer exists) -- noted directly in the file.
2026-07-21 22:59:29 +00:00
|
|
|
pull_request:
|
2026-07-22 19:18:36 +00:00
|
|
|
branches: [main, dev]
|
|
|
|
|
workflow_call: {}
|
Standalone frontend: no-walk paths.py, own Dockerfile, own CI
paths.py drops the sibling-directory walk (frontend is now the repo
root: static/ and content/ are its own subdirectories, no more
sibling walk needed). New Dockerfile (much smaller deps -- fastapi,
uvicorn, httpx, jinja2, PyYAML -- no entrypoint script needed at all,
frontend has no migrations/pre-boot logic).
content/ is a committed starter copy for now, not yet real cross-repo
vendoring from thermograph-copy (that repo doesn't exist yet) -- noted
in paths.py's own docstring.
Real, known gap flagged rather than silently skipped: this process
cannot boot standalone (content.register() fetches the IndexNow key
from backend at import time with no retry, by design), so build.yml
only verifies the image builds, not a live boot+healthz check -- that
needs a genuine cross-repo contract-test job (booting a real backend
too), separate follow-up work. Same reason tests/ doesn't run here yet
(its conftest.py still imports backend's own test fixtures via a
sibling path that no longer exists) -- noted directly in the file.
2026-07-21 22:59:29 +00:00
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
|
build:
|
|
|
|
|
runs-on: docker
|
|
|
|
|
steps:
|
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
|
|
|
|
|
|
- name: Install Docker CLI
|
|
|
|
|
run: |
|
|
|
|
|
apt-get update -qq
|
|
|
|
|
apt-get install -y -qq docker.io
|
|
|
|
|
|
|
|
|
|
- name: Build
|
|
|
|
|
run: docker build -t thermograph-frontend:ci .
|
2026-07-23 00:59:06 +00:00
|
|
|
|
|
|
|
|
# Run the hermetic unit tier INSIDE the image we just built (it ships
|
|
|
|
|
# tests/ + all runtime deps via COPY . /app/): fixture-backed rendering
|
|
|
|
|
# tests, no backend, no network. The integration tier
|
|
|
|
|
# (tests/integration/, needs a live backend container) stays a local
|
|
|
|
|
# `make`/scripts concern -- see scripts/backend-for-tests.sh.
|
|
|
|
|
# requirements-dev.txt only layers pytest on top, so the install is tiny.
|
|
|
|
|
# -u 0: the image's default user can't write to site-packages.
|
|
|
|
|
# unset THERMOGRAPH_BASE: the image bakes the prod root-mount; the tests
|
|
|
|
|
# expect the app default (/thermograph), same rationale as the backend.
|
|
|
|
|
- name: Run unit tests in the built image
|
|
|
|
|
run: |
|
|
|
|
|
docker run --rm -u 0 thermograph-frontend:ci \
|
|
|
|
|
sh -c "unset THERMOGRAPH_BASE; pip install -q --no-cache-dir pytest==8.4.1 && python -m pytest tests/unit -q"
|
|
|
|
|
|