Skip to content

Commit

Permalink
Make re-run flaky tests work with CI Security workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Cyberboss committed Aug 18, 2024
1 parent 8496002 commit b71e3f4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/rerun-flaky-tests.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Rerun Flaky Live Tests
on:
workflow_run:
workflows: [CI Pipeline]
workflows: ['CI Pipeline', 'CI Security']
types:
- completed
jobs:
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/scripts/rerunFlakyTests.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ export async function rerunFlakyTests({ github, context }) {

const filteredFailingJobs = failingJobs.filter((job) => {
console.log(`Failing job: ${job.name}`)
return CONSIDERED_JOBS.some((title) => job.name.startsWith(title));
return CONSIDERED_JOBS
.flatMap(jobName => [jobName, 'CI Pipeline / ' + jobName])
.some((title) => job.name.startsWith(title));
});
if (filteredFailingJobs.length !== failingJobs.length) {
console.log("One or more failing jobs are NOT designated flaky. Not rerunning.");
Expand Down

0 comments on commit b71e3f4

Please sign in to comment.