#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.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
#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)traffic-control-tests): ubuntu,actions/checkout+actions/setup-python, runpython -m unittest discover -s .github/scripts -p 'test_*.py'(or the specific test file). No emulator, no Gradle — pure stdlib Python, runs in seconds.CI passedgate (add it to that job'sneeds:) so a traffic-control test failure blocks merge, matching how the other jobs feedci-passed.actions/checkout/setup-pythonpins).Dependency
Depends on #345 (#342) — the test file lands with it. Base off
mainif #345 has merged; otherwise base off theci-342-traffic-control-pythonbranch so the tests are present (this PR then merges after #345).Small CI-config task.