-
Notifications
You must be signed in to change notification settings - Fork 1.8k
107 lines (89 loc) · 3.5 KB
/
flaky-tests.yaml
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
name: Flaky Tests Detector
run-name: Flaky Tests Detector - ${{ github.run_id }} - @${{ github.actor }}
on:
pull_request:
paths:
- '**.go'
- '.github/workflows/flaky-tests.yaml'
permissions:
pull-requests: read
issues: read
jobs:
test:
name: Flaky Tests Detector
runs-on: ubuntu-22.04-16core
permissions:
contents: read
packages: read
container:
image: ghcr.io/gravitational/teleport-buildbox:teleport16
env:
TELEPORT_ETCD_TEST: yes
TELEPORT_ETCD_TEST_ENDPOINT: https://etcd0:2379
TELEPORT_XAUTH_TEST: yes
TELEPORT_BPF_TEST: yes
WEBASSETS_SKIP_BUILD: 1
options: --cap-add=SYS_ADMIN --privileged
services:
etcd0:
image: ghcr.io/gravitational/ci-etcd:3.3.9
options: >-
--health-interval 10s
--health-timeout 5s
--health-retries 5
--add-host etcd0:127.0.0.1
ports:
- 2379:2379
- 2380:2380
- 3379:3379
steps:
- name: Checkout Teleport
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Prepare workspace
uses: ./.github/actions/prepare-workspace
- name: Mount debugfs
run: mount -t debugfs none /sys/kernel/debug/
- name: Prepare unit tests
run: make test-go-prepare
- name: Generate GitHub Token
id: generate_token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ secrets.REVIEWERS_APP_ID }}
private-key: ${{ secrets.REVIEWERS_PRIVATE_KEY }}
- name: Checkout shared-workflows
uses: actions/checkout@v4
with:
repository: gravitational/shared-workflows
path: .github/shared-workflows
ref: main
- name: Find excluded tests
id: find_excluded
run: cd .github/shared-workflows/bot && go run main.go -workflow=exclude-flakes -token="${{ steps.generate_token.outputs.token }}" -reviewers="${{ secrets.reviewers }}"
- name: Run base difftest
uses: ./.github/actions/difftest
with:
flags: --skip="${{ steps.find_excluded.outputs.FLAKE_SKIP }}" -e "integrations/operator/**/*" -e "integrations/terraform/**/*" -e "integrations/event-handler/**/*" -e "tool/tsh/**/*" -e "integration/**/*" -e "build.assets/**/*" -e "lib/auth/webauthncli/**/*" -e "lib/auth/touchid/**/*" -e "api/**/*" -e "examples/teleport-usage/**/*" -e "integrations/access/**" -e "integrations/lib/**" -e "integrations/lib/backoff/backoff_test.go" -e "e2e/**/*"
target: test-go-unit
- name: Run touch-id difftest
uses: ./.github/actions/difftest
with:
flags: --skip="${{ steps.find_excluded.outputs.FLAKE_SKIP }}" --include "lib/auth/touchid/**/*"
target: test-go-touch-id
- name: Run tsh difftest
uses: ./.github/actions/difftest
with:
flags: --skip="${{ steps.find_excluded.outputs.FLAKE_SKIP }}" --include "tool/tsh/**/*"
target: test-go-tsh
- name: Run api difftest
uses: ./.github/actions/difftest
with:
flags: --skip="${{ steps.find_excluded.outputs.FLAKE_SKIP }}" --include "api/**/*" --relative "api"
target: test-api
- name: Run teleport-usage difftest
uses: ./.github/actions/difftest
with:
flags: --skip="${{ steps.find_excluded.outputs.FLAKE_SKIP }}" --include "examples/teleport-usage/**/*" --relative "examples/teleport-usage"
target: test-teleport-usage