From cee6ba8c83ed477e7d8f89133dbb5631488c57df Mon Sep 17 00:00:00 2001 From: Iajret <8430839+Iajret@users.noreply.github.com> Date: Thu, 19 Oct 2023 21:25:27 +0300 Subject: [PATCH] =?UTF-8?q?=D1=81=D0=BE=D0=B7=D0=B4=D0=B0=D1=91=D0=BC=20re?= =?UTF-8?q?run=5Ftests.yml=20=D0=B2=D0=B7=D0=B0=D0=BC=D0=B5=D0=BD=20rerun?= =?UTF-8?q?=20flaky=20tests?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/rerun_tests.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 .github/workflows/rerun_tests.yml diff --git a/.github/workflows/rerun_tests.yml b/.github/workflows/rerun_tests.yml new file mode 100644 index 00000000000..92ffbe5f0ef --- /dev/null +++ b/.github/workflows/rerun_tests.yml @@ -0,0 +1,19 @@ +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@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 })