Skip to content

Commit d492547

Browse files
committed
debug
1 parent c25eea2 commit d492547

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

ci-script/xd.py

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,30 @@
11
import json
22
import sys
33
import os
4+
from pathlib import Path
45

56
print("Checking required checks")
6-
print(os.environ['NEEDS'])
7+
print(os.environ["NEEDS"])
78

8-
# Get job names and results from GitHub context
9-
jobs = json.loads(os.environ['NEEDS'])
9+
jobs = json.loads(os.environ["NEEDS"])
1010
job_names = sorted(jobs.keys())
1111
for job_name in job_names:
12-
result = jobs[job_name]['result']
12+
result = jobs[job_name]["result"]
1313
print(f"- {job_name}: {result}")
1414
print()
1515

1616
failed = False
17+
print(list(Path(".").glob("*")))
1718
for job_name in job_names:
18-
result = jobs[job_name]['result']
19-
19+
result = jobs[job_name]["result"]
20+
2021
# Skip test-go-pg failures on windows
21-
if job_name == "test-go-pg":
22-
runner_os = jobs[job_name]['outputs'].get('runner_os')
23-
if "windows" in runner_os and result == "failure":
22+
if job_name == "test-go-pg" and result == "failure":
23+
result_artifacts = list(Path("pg_result").glob("pg_result_*"))
24+
results = {f.name: int(f.read_text()) for f in result_artifacts}
25+
del results["pg_result_windows-2022"]
26+
if sum(results.values()) == 0:
2427
continue
25-
2628
if result in ["failure", "cancelled"]:
2729
failed = True
2830
break

0 commit comments

Comments
 (0)