From 73f11051bd62fb0c7a4cc5949d47fc7bfa46db59 Mon Sep 17 00:00:00 2001 From: Brad Stein Date: Sun, 17 May 2026 00:15:02 -0300 Subject: [PATCH] ci: publish category failures when tests cannot collect --- scripts/ci/test_gate.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/scripts/ci/test_gate.sh b/scripts/ci/test_gate.sh index 12e5fbc..05ed4c4 100755 --- a/scripts/ci/test_gate.sh +++ b/scripts/ci/test_gate.sh @@ -86,12 +86,15 @@ current_target = '' manifest_path = pathlib.Path('tests/test-taxonomy-manifest.json') category_by_path = {} +test_categories = set() if manifest_path.exists(): for item in json.loads(manifest_path.read_text(encoding='utf-8')): path = item.get('new', '') category = item.get('category', '') if path and category: category_by_path[path] = category + if category not in {'fixtures', 'golden', 'helpers'}: + test_categories.add(category) def category_for_target(target: str) -> str: if target in category_by_path: @@ -124,6 +127,14 @@ for raw in log_path.read_text(encoding='utf-8', errors='replace').splitlines(): counts[key] += int(match.group(key)) outcome = 'ok' if status == 0 else 'failed' +if status != 0 and not test_cases: + fallback_categories = sorted(test_categories) or ['uncategorized'] + for category in fallback_categories: + test_cases.append({ + 'test': '__test_collection_failed__', + 'category': category, + 'status': 'failed', + }) summary = { 'suite': 'lesavka', 'branch': branch,