forked from memgraph/memgraph
-
Notifications
You must be signed in to change notification settings - Fork 0
183 lines (175 loc) · 5.77 KB
/
check_flakiness.yaml
File metadata and controls
183 lines (175 loc) · 5.77 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
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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
name: "Check Diff for flakiness"
concurrency:
group: ${{ github.head_ref }}-${{ github.sha }}
cancel-in-progress: true
on:
schedule:
- cron: "0 1 * * *" #UTC
workflow_dispatch:
inputs:
community_core:
type: boolean
default: true
description: ""
coverage_core:
type: boolean
default: true
description: ""
debug_core:
type: boolean
default: true
description: ""
debug_integration:
type: boolean
default: true
description: ""
jepsen_core:
type: boolean
default: true
description: ""
release:
description: 'Comma-separated list of release tests to run (e.g. core,benchmark,e2e,stress,query_modules)'
default: 'core,e2e,stress,query_modules'
malloc_build:
type: boolean
default: true
flakiness_runs:
type: number
default: 3
required: true
description: "Check for flakiness by running every selected job multiple times. Enter a number between 2 and 20."
jobs:
DiffSetup:
runs-on: ubuntu-latest
outputs:
run_community_core: ${{ steps.setup.outputs.run_community_core }}
run_coverage_core: ${{ steps.setup.outputs.run_coverage_core }}
run_debug_core: ${{ steps.setup.outputs.run_debug_core }}
run_debug_integration: ${{ steps.setup.outputs.run_debug_integration }}
run_jepsen_core: ${{ steps.setup.outputs.run_jepsen_core }}
run_release_core: ${{ steps.setup.outputs.run_release_core }}
run_release_benchmark: ${{ steps.setup.outputs.run_release_benchmark}}
run_release_e2e: ${{ steps.setup.outputs.run_release_e2e }}
run_release_stress: ${{ steps.setup.outputs.run_release_stress }}
run_release_query_modules: ${{ steps.setup.outputs.run_release_query_modules }}
run_malloc_build: ${{ steps.setup.outputs.run_malloc_build }}
runs: ${{ steps.setup_flakiness.outputs.runs }}
env:
GH_CONTEXT: ${{ toJson(github) }}
GH_CONTEXT_FILE_NAME: github_context.json
FLAKINESS_RUNS: ${{ github.event.inputs.flakiness_runs || 10 }}
steps:
- name: Set up repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Dump GitHub context
run: echo "$GH_CONTEXT" >> "$GH_CONTEXT_FILE_NAME"
- name: Set up diff execution
id: setup
run: ./tools/diff_setup.py --gh-context-path "$GH_CONTEXT_FILE_NAME" --base-branch "origin/master"
- name: Set up flakiness runs
id: setup_flakiness
run: |
if [[ $FLAKINESS_RUNS -lt 2 ]] || [[ $FLAKINESS_RUNS -gt 20 ]]; then
echo "ERROR: Selected 'flakiness_runs' value is invalid. Please select a value between 2 and 20."
exit 1
fi
sequence=""
for i in $(seq 1 $FLAKINESS_RUNS); do
sequence+="${i},"
done
echo "runs=[${sequence::-1}]" >> $GITHUB_OUTPUT
Community:
needs: DiffSetup
strategy:
fail-fast: false
max-parallel: 3
matrix:
run_no: ${{ fromJSON(needs.DiffSetup.outputs.runs) }}
uses: ./.github/workflows/diff_community.yaml
with:
arch: 'amd'
os: 'ubuntu-24.04'
toolchain: 'v6'
run_core: ${{ needs.DiffSetup.outputs.run_community_core }}
run_id: "${{ matrix.run_no }}"
secrets: inherit
Coverage:
needs: DiffSetup
strategy:
fail-fast: false
max-parallel: 3
matrix:
run_no: ${{ fromJSON(needs.DiffSetup.outputs.runs) }}
uses: ./.github/workflows/diff_coverage.yaml
with:
arch: 'amd'
os: 'ubuntu-24.04'
toolchain: 'v6'
run_core: ${{ needs.DiffSetup.outputs.run_coverage_core }}
run_clang_tidy: ${{ needs.DiffSetup.outputs.run_coverage_core }}
run_id: "${{ matrix.run_no }}"
secrets: inherit
Debug:
needs: DiffSetup
strategy:
fail-fast: false
max-parallel: 3
matrix:
run_no: ${{ fromJSON(needs.DiffSetup.outputs.runs) }}
uses: ./.github/workflows/diff_debug.yaml
with:
arch: 'amd'
os: 'ubuntu-24.04'
toolchain: 'v6'
run_core: ${{ needs.DiffSetup.outputs.run_debug_core }}
run_integration: ${{ needs.DiffSetup.outputs.run_debug_integration }}
run_id: "${{ matrix.run_no }}"
secrets: inherit
Jepsen:
needs: DiffSetup
strategy:
fail-fast: false
max-parallel: 3
matrix:
run_no: ${{ fromJSON(needs.DiffSetup.outputs.runs) }}
uses: ./.github/workflows/diff_jepsen.yaml
with:
run_core: ${{ needs.DiffSetup.outputs.run_jepsen_core }}
run_id: "${{ matrix.run_no }}"
secrets: inherit
Release:
needs: DiffSetup
strategy:
fail-fast: false
max-parallel: 3
matrix:
run_no: ${{ fromJSON(needs.DiffSetup.outputs.runs) }}
uses: ./.github/workflows/diff_release.yaml
with:
arch: 'amd'
os: 'ubuntu-24.04'
toolchain: 'v6'
run_core: ${{ needs.DiffSetup.outputs.run_release_core }}
run_benchmark: ${{ needs.DiffSetup.outputs.run_release_benchmark =='true' && github.event_name == 'workflow_dispatch' }}
run_e2e: ${{ needs.DiffSetup.outputs.run_release_e2e }}
run_stress: ${{ needs.DiffSetup.outputs.run_release_stress }}
run_query_modules: ${{ needs.DiffSetup.outputs.run_release_query_modules }}
run_id: "${{ matrix.run_no }}"
secrets: inherit
Malloc:
needs: DiffSetup
strategy:
fail-fast: false
max-parallel: 3
matrix:
run_no: ${{ fromJSON(needs.DiffSetup.outputs.runs) }}
uses: ./.github/workflows/diff_malloc.yaml
with:
arch: 'amd'
os: 'ubuntu-24.04'
toolchain: 'v6'
run_build: ${{ needs.DiffSetup.outputs.run_malloc_build }}
run_id: "${{ matrix.run_no }}"
secrets: inherit