Skip to content

Commit

Permalink
yea
Browse files Browse the repository at this point in the history
  • Loading branch information
FalloutFalcon committed Sep 20, 2024
1 parent 7398e60 commit 933c2fb
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/rerun_flaky_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,18 @@ on:
types:
- completed
jobs:
test_run_on_first:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.run_attempt == 1 }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Rerun flaky tests
uses: actions/github-script@v6
with:
script: |
const { rerunFlakyTests } = await import('${{ github.workspace }}/tools/pull_request_hooks/rerunFlakyTests.js')
await rerunFlakyTests({ github, context })
rerun_flaky_tests:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'failure' && github.event.workflow_run.run_attempt == 1 }}
Expand Down
1 change: 1 addition & 0 deletions tools/pull_request_hooks/rerunFlakyTests.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ async function getFailedJobsForRun(github, context, workflowRunId, runAttempt) {
}

export async function rerunFlakyTests({ github, context }) {
console.log("Flakey Test Checker")
const failingJobs = await getFailedJobsForRun(
github,
context,
Expand Down

0 comments on commit 933c2fb

Please sign in to comment.