forked from temporalio/temporal
-
Notifications
You must be signed in to change notification settings - Fork 0
76 lines (68 loc) · 2.21 KB
/
flaky-tests-report.yml
File metadata and controls
76 lines (68 loc) · 2.21 KB
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
name: Flaky Tests Report
on:
schedule:
# Run on Wednesdays at noon Eastern time (5 PM UTC)
- cron: "0 17 * * 3"
workflow_dispatch:
inputs:
days:
description: "Number of days to look back for flaky tests"
required: false
default: "7"
type: string
max_links:
description: "Maximum number of failure links to show per test"
required: false
default: "3"
type: string
permissions:
contents: read
actions: read
jobs:
flaky-tests-report:
runs-on: ubuntu-latest
steps:
- name: Generate token
id: generate_token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ secrets.TEMPORAL_CICD_APP_ID }}
private-key: ${{ secrets.TEMPORAL_CICD_PRIVATE_KEY }}
owner: ${{ github.repository_owner }}
- name: Checkout repository
uses: actions/checkout@v6
with:
persist-credentials: false
token: ${{ steps.generate_token.outputs.token }}
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: "go.mod"
- name: Generate flaky test report
id: process-flaky-tests
env:
GH_TOKEN: ${{ steps.generate_token.outputs.token }}
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
DAYS_PARAM: ${{ github.event.inputs.days || '7' }}
MAX_LINKS_PARAM: ${{ github.event.inputs.max_links || '3' }}
RUN_ID: ${{ github.run_id }}
REF_NAME: ${{ github.ref_name }}
SHA: ${{ github.sha }}
run: |
set -euo pipefail
go run ./cmd/tools/flakereport generate \
--days "$DAYS_PARAM" \
--max-links "$MAX_LINKS_PARAM" \
--output-dir tools/flakes/out \
--slack-webhook "$SLACK_WEBHOOK" \
--run-id "$RUN_ID" \
--ref-name "$REF_NAME" \
--sha "$SHA"
- name: Upload generated reports
uses: actions/upload-artifact@v4
if: steps.process-flaky-tests.outcome == 'success'
with:
name: flaky-tests-reports-${{ github.run_number }}
path: tools/flakes/out/*
retention-days: 30