|
1 | 1 | import json
|
2 | 2 | import sys
|
3 | 3 | import os
|
| 4 | +from pathlib import Path |
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 | for job_name in job_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 | for job_name in job_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 |
| - 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: |
24 | 27 | continue
|
25 |
| - |
26 | 28 | if result in ["failure", "cancelled"]:
|
27 | 29 | failed = True
|
28 | 30 | break
|
|
0 commit comments