|
1 | 1 | importjson
|
2 | 2 | importsys
|
3 | 3 | importos
|
| 4 | +frompathlibimportPath |
4 | 5 |
|
5 | 6 | print("Checking required checks")
|
6 |
| -print(os.environ['NEEDS']) |
| 7 | +print(os.environ["NEEDS"]) |
7 | 8 |
|
8 |
| -# Get job names and results from GitHub context |
9 |
| -jobs=json.loads(os.environ['NEEDS']) |
| 9 | +jobs=json.loads(os.environ["NEEDS"]) |
10 | 10 | job_names=sorted(jobs.keys())
|
11 | 11 | forjob_nameinjob_names:
|
12 |
| -result=jobs[job_name]['result'] |
| 12 | +result=jobs[job_name]["result"] |
13 | 13 | print(f"-{job_name}:{result}")
|
14 | 14 | print()
|
15 | 15 |
|
16 | 16 | failed=False
|
| 17 | +print(list(Path(".").glob("*"))) |
17 | 18 | forjob_nameinjob_names:
|
18 |
| -result=jobs[job_name]['result'] |
19 |
| -
|
| 19 | +result=jobs[job_name]["result"] |
| 20 | + |
20 | 21 | # Skip test-go-pg failures on windows
|
21 |
| -ifjob_name=="test-go-pg": |
22 |
| -runner_os=jobs[job_name]['outputs'].get('runner_os') |
23 |
| -if"windows"inrunner_osandresult=="failure": |
| 22 | +ifjob_name=="test-go-pg"andresult=="failure": |
| 23 | +result_artifacts=list(Path("pg_result").glob("pg_result_*")) |
| 24 | +results= {f.name:int(f.read_text())forfinresult_artifacts} |
| 25 | +delresults["pg_result_windows-2022"] |
| 26 | +ifsum(results.values())==0: |
24 | 27 | continue
|
25 |
| - |
26 | 28 | ifresultin ["failure","cancelled"]:
|
27 | 29 | failed=True
|
28 | 30 | break
|
|