fix: run mypy and shellcheck in pr_checks

validate.yml runs mypy against its baseline and checks that shellcheck
is installed, and pr_checks ran neither. The guard test only knew the
python, vermin and npm commands, so it missed both. A step can now pipe
its output into a second command, as mypy into mypy-baseline filter.
This commit is contained in:
Abdessamad Derraz committed 2026-11-06 17:58:44 +01:00
1 parent b9f309940c
commit 0c074f8458
4 files changed
+32 -11

No files matched your search

+2 -2
View File
@@ -221,7 +221,7 @@ class OneCommandRunsTheChecks(unittest.TestCase):
skipping one (refresh_data_dirs) failed the pack tests with no hint."""
CHECK = re.compile(r"(?:xargs -0 |run: |^\s*)((?:python3?\.?8? -m unittest|python scripts/\w+\.py"
r"|vermin|npm (?:ci|run build)))")
r"|vermin|npm (?:ci|run build)|mypy-baseline filter|mypy|shellcheck))")
def test_every_check_ci_runs_is_a_step(self):
import pr_checks
@@ -230,7 +230,7 @@ class OneCommandRunsTheChecks(unittest.TestCase):
ran = {m.group(1) for line in workflow.splitlines()
if not line.strip().startswith("#") for m in [self.CHECK.search(line)] if m}
self.assertGreaterEqual(len(ran), 10)
steps = [step.command for step in pr_checks.STEPS]
steps = [c for step in pr_checks.STEPS for c in (step.command, step.then) if c]
for check in sorted(ran):
with self.subTest(check=check):
self.assertTrue(any(command.startswith(check) for command in steps))