-
-
Notifications
You must be signed in to change notification settings - Fork 539
37 lines (35 loc) · 1.19 KB
/
rerun_flaky_tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: Rerun/Report Flaky Tests
on:
workflow_run:
workflows: [Checks, TGS Test Suite]
types:
- completed
permissions:
actions: write
contents: write
issues: write
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 })
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@v3
- name: Report flaky tests
uses: actions/github-script@v6
with:
script: |
const { reportFlakyTests } = await import('${{ github.workspace }}/tools/pull_request_hooks/rerunFlakyTests.js')
await reportFlakyTests({ github, context })