Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .github/workflows/board_tests.yml
Original file line number Diff line number Diff line change
@@ -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
5 changes: 2 additions & 3 deletions .github/workflows/organism_board.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
5 changes: 4 additions & 1 deletion scripts/organism_board.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,10 @@ def _render_html(snapshot: dict) -> str:
f"<p><span class='name'>{link}</span> "
f"<span class='head'>{head}</span>"
f"<span class='role'>{_html.escape(b['role'])}</span></p></div>")
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.
Expand Down
3 changes: 1 addition & 2 deletions tests/test_organism_board.py
Original file line number Diff line number Diff line change
@@ -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.
"""
Expand Down
Loading