Make the test summary steps in the CI fail silently (#21867)

This commit is contained in:
Kuba Wieczorek 2023-07-14 18:26:38 +01:00 committed by GitHub
parent f351fe471a
commit 80f0015723
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -294,6 +294,10 @@ jobs:
run_id: context.runId,
});
// This is a temporary debugging statement to catch an intermittent API issue
// we will remove it once this script runs reliably
console.log(result.data);
const prefixToSearchFor = 'Run Go tests / test-go (${{ matrix.id }}'
const jobData = result.data.jobs.filter(
(job) => job.name.startsWith(prefixToSearchFor)
@ -303,9 +307,7 @@ jobs:
jobData.length == 0 ||
jobData[0].html_url === undefined
) {
const msg = "Failed to fetch GHA job data.";
console.log(msg);
throw new Error(msg);
console.log("Failed to fetch GHA job data.");
}
const url = jobData[0].html_url;
@ -319,6 +321,7 @@ jobs:
});
- name: Prepare failure summary
if: success() || failure()
continue-on-error: true
run: |
# This jq query filters out successful tests, leaving only the failures.
# Then, it formats the results into rows of a Markdown table.