fix: run the suite on both roads into main

validate.yml triggered on pull_request alone, and it holds the only
unittest invocation in the repository: deploy-site.yml stops at
validate_schemas, generation and the freshness diff. Work lands on main
by direct push far more often than by pull request, so 1,318 cases were
guarding the road almost nothing takes.

The suite and the schema check now run on both events. validate-bios and
label-pr read pull request context and carry an event guard. The
concurrency group falls back to the ref, so a push series collapses to
the tip: what stays verified is the head of main.

The path lists are spelled out per event because the workflow parser
reads no YAML anchor, which PyYAML would have accepted in silence. Four
tests hold the wiring: the suite reachable from a push, the two path
lists equal, every job reading pull request context guarded, and no
anchor in any workflow.
This commit is contained in:
Abdessamad Derraz committed 2026-09-04 13:40:11 +02:00
1 parent 60c723a3bf
commit 5587c25675
5 files changed
+119 -19

No files matched your search

+11 -4
View File
@@ -246,10 +246,17 @@ Ideally, tests, code, and documentation ship together. When profiles and platfor
## CI integration
The `validate.yml` workflow runs `python -m unittest discover tests -v` on every
pull request that touches `bios/`, `platforms/`, `emulators/`, `schemas/`,
`scripts/`, `tests/` or `install.py`. The test job (`run-tests`) runs in parallel
with BIOS validation, schema validation, and auto-labeling.
The `validate.yml` workflow runs `python -m unittest discover tests -v` on both
roads into main: every pull request, and every direct push, that touches
`bios/`, `platforms/`, `emulators/`, `schemas/`, `scripts/`, `tests/` or
`install.py`. Work reaches main by push as often as by pull request, so a suite
wired to pull requests alone would guard the road nobody takes. The test job
(`run-tests`) runs in parallel with schema validation, and on a pull request
with BIOS validation and auto-labeling too; those two read pull request context
and stay behind an event guard.
A push series collapses to the tip, so what a green run states is that the head
of main passes, not every commit under it.
Modules that need real artifacts skip themselves when those artifacts are absent,
so `test_pack_integrity` is a no-op in CI (no `dist/`) and a real check locally.