From b1c5ca10903e278f326aaa1c1e5364ff8e90732a Mon Sep 17 00:00:00 2001 From: Jammy2211 Date: Mon, 5 Oct 2026 18:29:12 +0100 Subject: [PATCH] Use shared banner and board section navigation --- .github/workflows/board_tests.yml | 21 +++++++++++++++++++++ .github/workflows/organism_board.yml | 5 ++--- scripts/organism_board.py | 5 ++++- tests/test_organism_board.py | 3 +-- 4 files changed, 28 insertions(+), 6 deletions(-) create mode 100644 .github/workflows/board_tests.yml diff --git a/.github/workflows/board_tests.yml b/.github/workflows/board_tests.yml new file mode 100644 index 0000000..a9fd644 --- /dev/null +++ b/.github/workflows/board_tests.yml @@ -0,0 +1,21 @@ +name: Board tests +on: + pull_request: + push: + branches: [main] +permissions: + contents: read +jobs: + tests: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/checkout@v4 + with: + repository: PyAutoLabs/PyAutoBrain + path: PyAutoBrain + - uses: actions/setup-python@v5 + with: + python-version: '3.12' + - run: python -m pip install pytest pyyaml + - run: python -m pytest tests -q diff --git a/.github/workflows/organism_board.yml b/.github/workflows/organism_board.yml index d53f6d4..db76b26 100644 --- a/.github/workflows/organism_board.yml +++ b/.github/workflows/organism_board.yml @@ -8,9 +8,8 @@ name: Dashboard # board stays the authority; this page only routes. # # Six-hourly: the organ boards refresh on their own daily/push cadences, so -# the router follows within hours. Tests (`python -m pytest tests/`) run ad -# hoc — this repo deliberately carries no CI gate; this workflow building the -# page is the operational check. +# the router follows within hours. board_tests.yml checks fixture renders on PRs; +# this workflow builds and publishes the live page. on: schedule: diff --git a/scripts/organism_board.py b/scripts/organism_board.py index 9104e97..c087015 100644 --- a/scripts/organism_board.py +++ b/scripts/organism_board.py @@ -244,7 +244,10 @@ def _render_html(snapshot: dict) -> str: f"

{link} " f"{head}" f"{_html.escape(b['role'])}

") - hero = t.hero(BOARD_KEY, "Dashboard", _LEDE) + hero = t.hero(BOARD_KEY, "Dashboard", _LEDE, navigation=[ + {"href": b["url"], "label": b["name"]} + for b in snapshot.get("boards") or [] if b.get("url") + ]) # The way back from the Pages board to the repository front door; the # owner comes from the snapshot (the git remote), so the segment drops # out when the origin is unknown. diff --git a/tests/test_organism_board.py b/tests/test_organism_board.py index 72bbd50..b2a1d05 100644 --- a/tests/test_organism_board.py +++ b/tests/test_organism_board.py @@ -1,7 +1,6 @@ """tests/test_organism_board.py — the umbrella router board (fixture-only). -Run ad hoc with `python -m pytest tests/` — this repo has no CI gate; the -board workflow building the page is the operational check. What matters: +Run with `python -m pytest tests/`, also exercised by board_tests.yml. What matters: routing follows the Heart verdict, every fmt renders from a snapshot, rows degrade to "unavailable", and the html is self-contained. """