@@ -64,16 +64,20 @@ jobs:
64
64
print("Success")
65
65
with open(github_output, 'a') as output_file:
66
66
print(f'{output_name}=success', file=output_file)
67
+ # This is used by the `required` job to determine if the test-go-pg job
68
+ # failed or not on the given OS. Matrix jobs don't support `outputs`
69
+ # well - the last job to run overwrites them. Instead, we write to
70
+ # artifacts.
67
71
- if : always()
68
- run : echo "0" > "pg_result_${{ matrix.os }}"
72
+ run : echo "0" > "test-go- pg_result_${{ matrix.os }}"
69
73
- if : failure()
70
- run : echo "1" > "pg_result_${{ matrix.os }}"
74
+ run : echo "1" > "test-go- pg_result_${{ matrix.os }}"
71
75
- name : Upload result artifact
72
76
if : always()
73
77
uses : actions/upload-artifact@v4
74
78
with :
75
- name : " pg_result_${{ matrix.os }}"
76
- path : " pg_result_${{ matrix.os }}"
79
+ name : " test-go- pg_result_${{ matrix.os }}"
80
+ path : " test-go- pg_result_${{ matrix.os }}"
77
81
78
82
79
83
required :
@@ -97,11 +101,11 @@ jobs:
97
101
uses : step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
98
102
with :
99
103
egress-policy : audit
100
- - name : Download PG Failed Artifacts
104
+ - name : Download test-go-pg Artifacts
101
105
uses : actions/download-artifact@v4
102
106
with :
103
- path : pg_result
104
- pattern : pg_result_*
107
+ path : test-go- pg_result
108
+ pattern : test-go- pg_result_*
105
109
merge-multiple : true
106
110
- name : Ensure required checks
107
111
shell : python
@@ -122,20 +126,18 @@ jobs:
122
126
print()
123
127
124
128
failed = False
125
- print("all files")
126
- print(list(Path(".").glob("*")))
127
129
for job_name in job_names:
128
130
result = jobs[job_name]["result"]
129
131
130
132
# Skip test-go-pg failures on windows
131
133
if job_name == "test-go-pg" and result == "failure":
132
- result_artifacts = list(Path("pg_result").glob("pg_result_*"))
133
- print("result_artifacts")
134
- print(result_artifacts)
134
+ result_artifacts = list(Path("test-go-pg_result").glob("test-go-pg_result_*"))
135
135
results = {f.name: int(f.read_text()) for f in result_artifacts}
136
- del results["pg_result_windows-2022"]
136
+ del results["test-go- pg_result_windows-2022"]
137
137
if sum(results.values()) == 0:
138
+ print("test-go-pg on windows-2022 failed, but we are skipping it")
138
139
continue
140
+
139
141
if result in ["failure", "cancelled"]:
140
142
failed = True
141
143
break
0 commit comments