ci: run the traffic-controller Python unit tests as a CI gate job #346

Closed
opened 2026-07-05 03:29:49 +00:00 by JMR-dev · 0 comments
JMR-dev commented 2026-07-05 03:29:49 +00:00 (Migrated from github.com)

#342 (PR #345) added .github/scripts/traffic_control.py + test_traffic_control.py, but the 37 unit tests are not executed in CI — they only run locally. Add a CI job that runs them on every PR, so a regression in the traffic-controller logic fails CI (the actual run, as part of the gate).

Scope (.github/workflows/ci.yml)

  • Add a fast job (e.g. traffic-control-tests): ubuntu, actions/checkout + actions/setup-python, run python -m unittest discover -s .github/scripts -p 'test_*.py' (or the specific test file). No emulator, no Gradle — pure stdlib Python, runs in seconds.
  • Wire it into the CI passed gate (add it to that job's needs:) so a traffic-control test failure blocks merge, matching how the other jobs feed ci-passed.
  • SHA-pin any action, per repo convention (see the existing actions/checkout / setup-python pins).

Dependency

Depends on #345 (#342) — the test file lands with it. Base off main if #345 has merged; otherwise base off the ci-342-traffic-control-python branch so the tests are present (this PR then merges after #345).

Small CI-config task.

#342 (PR #345) added `.github/scripts/traffic_control.py` + `test_traffic_control.py`, but the 37 unit tests are **not executed in CI** — they only run locally. Add a CI job that runs them on every PR, so a regression in the traffic-controller logic fails CI (the actual run, as part of the gate). ## Scope (`.github/workflows/ci.yml`) - Add a fast job (e.g. `traffic-control-tests`): ubuntu, `actions/checkout` + `actions/setup-python`, run `python -m unittest discover -s .github/scripts -p 'test_*.py'` (or the specific test file). No emulator, no Gradle — pure stdlib Python, runs in seconds. - **Wire it into the `CI passed` gate** (add it to that job's `needs:`) so a traffic-control test failure blocks merge, matching how the other jobs feed `ci-passed`. - SHA-pin any action, per repo convention (see the existing `actions/checkout` / `setup-python` pins). ## Dependency Depends on **#345** (#342) — the test file lands with it. Base off `main` if #345 has merged; otherwise base off the `ci-342-traffic-control-python` branch so the tests are present (this PR then merges after #345). Small CI-config task.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: JMR-dev/LibreMail#346