Skip to content

Commit 55fb70f

Browse files
committed
debug
1 parent e86b960 commit 55fb70f

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

ci-script/xd.py

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
import json
2+
import sys
3+
import os
4+
5+
print("Checking required checks")
6+
print(os.environ['NEEDS'])
7+
8+
# Get job names and results from GitHub context
9+
jobs = json.loads(os.environ['NEEDS'])
10+
job_names = sorted(jobs.keys())
11+
for job_name in job_names:
12+
result = jobs[job_name]['result']
13+
print(f"- {job_name}: {result}")
14+
print()
15+
16+
failed = False
17+
for job_name in job_names:
18+
result = jobs[job_name]['result']
19+
20+
# 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":
24+
continue
25+
26+
if result in ["failure", "cancelled"]:
27+
failed = True
28+
break
29+
30+
if failed:
31+
print("One of the required checks has failed or has been cancelled")
32+
sys.exit(1)
33+
34+
print("Required checks have passed")

0 commit comments

Comments
 (0)