Skip to content

Commit 36be76e

Browse files
feat: add flaky tests template (#314)
* feat: add flaky tests template * 🎨 Cleanup reusable workflows * 📝 Add workflow documentation * 📝 Add better documentation * 📝 Fix workflow name typo * 🎨 Using explicit version * 🎨 Add marvin to cla --------- Co-authored-by: Falk Puschner <falk.puschner@staffbase.com>
1 parent e9d27dd commit 36be76e

File tree

3 files changed

+80
-1
lines changed

3 files changed

+80
-1
lines changed

.github/workflows/cla.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ jobs:
2020
path-to-signatures: 'signatures/version1/cla.json'
2121
path-to-document: 'https://github.com/Staffbase/gha-workflows/blob/main/CLA.md'
2222
branch: 'signatures'
23-
allowlist: 0x46616c6b,axdotl,flaxel,kaitimmer,timdittler,*bot*
23+
allowlist: 0x46616c6b,axdotl,flaxel,kaitimmer,timdittler,MarvinZeising,*bot*
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Find flaky tests
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
slack-channel-id:
7+
required: true
8+
type: string
9+
slack-channel-name:
10+
required: true
11+
type: string
12+
repository:
13+
required: false
14+
type: string
15+
default: ${{ github.event.repository.full_name }}
16+
branch:
17+
required: false
18+
type: string
19+
default: 'main'
20+
prefix:
21+
required: true
22+
type: string
23+
secrets:
24+
slack-incoming-webhooks-url:
25+
required: true
26+
token:
27+
required: true
28+
29+
jobs:
30+
flaky-tests:
31+
name: Flaky-Tests
32+
runs-on: ubuntu-24.04
33+
steps:
34+
- name: Find flaky tests
35+
uses: Staffbase/github-action-find-flaky-tests@v0.1.0
36+
with:
37+
slack-channel-id: ${{ inputs.slack-channel-id }}
38+
slack-channel-name: ${{ inputs.slack-channel-name }}
39+
repository: ${{ inputs.repository }}
40+
branch: ${{ inputs.branch }}
41+
prefix: ${{ inputs.prefix }}
42+
slack-incoming-webhooks-url: ${{ secrets.slack-incoming-webhooks-url }}
43+
token: ${{ secrets.token }}

README.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,42 @@ jobs:
167167

168168
</details>
169169

170+
### Find Flaky Tests
171+
172+
<details>
173+
<summary>The action can be used to find flaky tests.</summary>
174+
175+
```yml
176+
name: Find flaky tests
177+
178+
on:
179+
# At 05:00 on Monday.
180+
schedule:
181+
- cron: '0 5 * * 1'
182+
183+
jobs:
184+
flaky-tests:
185+
uses: Staffbase/gha-workflows/.github/workflows/template_flaky_tests.yml@v7.4.0
186+
with:
187+
# identifier for the slack channel
188+
slack-channel-id: 45678787976
189+
# name of the slack channel
190+
slack-channel-name: '#flaky-tests'
191+
# optional: name of the repository where it should check, default: current repository
192+
repository: 'Staffbase/test-flaky'
193+
# optional: name of the branch where it should check, default: main
194+
branch: 'master'
195+
# prefix of the test run which should be filtered out
196+
prefix: 'test-'
197+
secrets:
198+
# URL of the Slack incoming webhooks
199+
slack-incoming-webhooks-url: ${{ secrets.SLACK_INCOMING_WEBHOOKS_URL }}
200+
# GitHub token
201+
token: ${{ secrets.GITHUB_TOKEN }}
202+
```
203+
204+
</details>
205+
170206
### GitOps
171207
172208
<details>

0 commit comments

Comments
 (0)