Skip to content
This repository was archived by the owner on May 5, 2025. It is now read-only.

Rerun/Report Flaky Tests #48

Rerun/Report Flaky Tests

Rerun/Report Flaky Tests #48

name: Rerun/Report Flaky Tests
on:
workflow_run:
workflows: [CI Suite]
types:
- completed
jobs:
rerun_flaky_tests:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'failure' && github.event.workflow_run.run_attempt == 1 }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Rerun flaky tests
uses: actions/github-script@v7
with:
script: |
const { rerunFlakyTests } = await import('${{ github.workspace }}/tools/pull_request_hooks/rerunFlakyTests.js')
await rerunFlakyTests({ github, context })
report_flaky_tests:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.run_attempt == 2 }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Report flaky tests
uses: actions/github-script@v7
with:
script: |
const { reportFlakyTests } = await import('${{ github.workspace }}/tools/pull_request_hooks/rerunFlakyTests.js')
await reportFlakyTests({ github, context })