Skip to content

E2E Flaky Tests Report #2

E2E Flaky Tests Report

E2E Flaky Tests Report #2

# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
---
name: "E2E Flaky Tests Report"
on: # yamllint disable-line rule:truthy
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
permissions:
contents: read
actions: read
env:
GITHUB_REPOSITORY: ${{ github.repository }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
jobs:
analyze-flaky-tests:
name: "Analyze E2E flaky tests"
runs-on: ubuntu-slim
steps:
- name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: "Analyze E2E test results"
id: analyze
run: python3 scripts/ci/analyze_e2e_flaky_tests.py
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MAX_RUNS: "10"
# E2E test runs come from the AMD workflow (every PR / push to main
# goes through it). The ARM canary is too sparse to drive flakiness
# analysis, so we keep the report tied to AMD.
WORKFLOW_NAME: "ci-amd.yml"
BRANCH: "main"
OUTPUT_FILE: "slack-message.json"
- name: "Post report to Slack"
if: always() && steps.analyze.outcome == 'success'
uses: slackapi/slack-github-action@dcb1066f776dd043e64d0e8ba94ca15cc7e1875d # v4.0.0
with:
method: chat.postMessage
token: ${{ env.SLACK_BOT_TOKEN }}
payload-file-path: "slack-message.json"
- name: "Upload analysis results"
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: "e2e-flaky-test-analysis"
path: slack-message.json
retention-days: 14
if: always()