Skip to content

Commit 21bcabd

Browse files
committed
[github] Add Unstable Test Reporter for CI to track flaky tests
1 parent 62a49a2 commit 21bcabd

File tree

2 files changed

+651
-0
lines changed

2 files changed

+651
-0
lines changed
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
################################################################################
2+
# Licensed to the Apache Software Foundation (ASF) under one
3+
# or more contributor license agreements. See the NOTICE file
4+
# distributed with this work for additional information
5+
# regarding copyright ownership. The ASF licenses this file
6+
# to you under the Apache License, Version 2.0 (the
7+
# "License"); you may not use this file except in compliance
8+
# with the License. You may obtain a copy of the License at
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# Unless required by applicable law or agreed to in writing, software
13+
# distributed under the License is distributed on an "AS IS" BASIS,
14+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
# See the License for the specific language governing permissions and
16+
# limitations under the License.
17+
################################################################################
18+
name: Unstable Test Reporter
19+
on:
20+
schedule:
21+
# Run at UTC 04:00 daily (after Nightly at UTC 20:00 + buffer for completion)
22+
- cron: "0 4 * * *"
23+
workflow_dispatch:
24+
inputs:
25+
lookback_hours:
26+
description: "Hours to look back for failed runs"
27+
required: false
28+
default: "28"
29+
30+
permissions:
31+
issues: write
32+
actions: read
33+
34+
jobs:
35+
report:
36+
name: "Report Unstable Tests"
37+
runs-on: ubuntu-latest
38+
steps:
39+
- name: Checkout code
40+
uses: actions/checkout@v6
41+
- name: Set up Python
42+
uses: actions/setup-python@v5
43+
with:
44+
python-version: "3.11"
45+
- name: Install dependencies
46+
run: pip install requests
47+
- name: Run unstable test reporter
48+
run: python tools/ci/unstable_test_reporter.py
49+
env:
50+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
51+
LOOKBACK_HOURS: ${{ inputs.lookback_hours || '28' }}

0 commit comments

Comments
 (0)