Skip to content

Commit 51482c0

Browse files
committed
debug
1 parent 55fb70f commit 51482c0

File tree

1 file changed

+28
-15
lines changed

1 file changed

+28
-15
lines changed

.github/workflows/ci.yaml

Lines changed: 28 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -409,6 +409,15 @@ jobs:
409409
print("Success")
410410
with open(github_output, 'a') as output_file:
411411
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+
412421

413422
# - name: Harden Runner
414423
# uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
@@ -456,13 +465,13 @@ jobs:
456465
# DB=ci gotestsum --format standard-quiet -- -v -short -count=1 ./...
457466
# fi
458467

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 }}
466475

467476
# NOTE: this could instead be defined as a matrix strategy, but we want to
468477
# only block merging if tests on postgres 13 fail. Using a matrix strategy
@@ -836,13 +845,19 @@ jobs:
836845
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
837846
with:
838847
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
840854
- name: Ensure required checks
841855
shell: python
842856
run: |
843857
import json
844858
import sys
845859
import os
860+
from pathlib import Path
846861
847862
print("Checking required checks")
848863
print(os.environ['NEEDS'])
@@ -857,14 +872,12 @@ jobs:
857872
failed = False
858873
for job_name in job_names:
859874
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
867875
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
868881
if result in ["failure", "cancelled"]:
869882
failed = True
870883
break

0 commit comments

Comments
 (0)