Skip to content

Commit 5ee1120

Browse files
committed
fix broken tests report when check_types unspecified
1 parent 8f2f59e commit 5ee1120

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

.github/actions/create_workflow_report/create_workflow_report.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -204,17 +204,18 @@ def get_known_fail_reason(test_name: str, check_name: str, known_fails: dict):
204204
# 1. Exact-name rules
205205
rule_data = known_fails["exact"].get(test_name)
206206
if rule_data:
207-
if any(
208-
check_type in check_name for check_type in rule_data.get("check_types", [])
207+
check_types = rule_data.get("check_types", [])
208+
if not check_types or any(
209+
check_type in check_name for check_type in check_types
209210
):
210211
return rule_data["reason"]
211212

212213
# 2. Pattern-name rules
213214
for name_re, rule_data in known_fails["pattern"].items():
214215
if name_re.fullmatch(test_name):
215-
if any(
216-
check_type in check_name
217-
for check_type in rule_data.get("check_types", [])
216+
check_types = rule_data.get("check_types", [])
217+
if not check_types or any(
218+
check_type in check_name for check_type in check_types
218219
):
219220
return rule_data["reason"]
220221

0 commit comments

Comments
 (0)