@@ -409,6 +409,15 @@ jobs:
409
409
print("Success")
410
410
with open(github_output, 'a') as output_file:
411
411
print(f'{output_name}=success', file=output_file)
412
+ - if : failure()
413
+ run : echo "1" >> "pg_failed_${{ matrix.os }}"
414
+ - name : Upload failed artifact
415
+ uses : actions/upload-artifact@v4
416
+ if : failure()
417
+ with :
418
+ name : " pg_failed_${{ matrix.os }}"
419
+ path : " pg_failed_${{ matrix.os }}"
420
+
412
421
413
422
# - name: Harden Runner
414
423
# uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
@@ -456,13 +465,13 @@ jobs:
456
465
# DB=ci gotestsum --format standard-quiet -- -v -short -count=1 ./...
457
466
# fi
458
467
459
- - name : Upload test stats to Datadog
460
- timeout-minutes : 1
461
- continue-on-error : true
462
- uses : ./.github/actions/upload-datadog
463
- if : success() || failure()
464
- with :
465
- api-key : ${{ secrets.DATADOG_API_KEY }}
468
+ # - name: Upload test stats to Datadog
469
+ # timeout-minutes: 1
470
+ # continue-on-error: true
471
+ # uses: ./.github/actions/upload-datadog
472
+ # if: success() || failure()
473
+ # with:
474
+ # api-key: ${{ secrets.DATADOG_API_KEY }}
466
475
467
476
# NOTE: this could instead be defined as a matrix strategy, but we want to
468
477
# only block merging if tests on postgres 13 fail. Using a matrix strategy
@@ -836,13 +845,19 @@ jobs:
836
845
uses : step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
837
846
with :
838
847
egress-policy : audit
839
-
848
+ - name : Download PG Failed Artifacts
849
+ uses : actions/download-artifact@v4
850
+ with :
851
+ path : pg_failed
852
+ pattern : pg_failed_*
853
+ merge-multiple : true
840
854
- name : Ensure required checks
841
855
shell : python
842
856
run : |
843
857
import json
844
858
import sys
845
859
import os
860
+ from pathlib import Path
846
861
847
862
print("Checking required checks")
848
863
print(os.environ['NEEDS'])
@@ -857,14 +872,12 @@ jobs:
857
872
failed = False
858
873
for job_name in job_names:
859
874
result = jobs[job_name]['result']
860
- runner_os = jobs[job_name]['outputs'].get('runner_os')
861
-
862
- # Skip test-go-pg failures on windows
863
- if (job_name == "test-go-pg" and
864
- "windows" in runner_os and
865
- result == "failure"):
866
- continue
867
875
876
+ # Skip test-go-pg failures on windowsx
877
+ if job_name == "test-go-pg" and result == "failure":
878
+ failed_artifacts = list(Path("pg_failed").glob("pg_failed_*"))
879
+ if len(failed_artifacts) == 1 and "windows" in str(failed_artifacts[0].name):
880
+ continue
868
881
if result in ["failure", "cancelled"]:
869
882
failed = True
870
883
break
0 commit comments