1
+ name : Lightweight - TestFlows Tests | ARM
2
+ run-name : ${{ inputs.custom_run_name || 'Lightweight - TestFlows Tests' }}
3
+
4
+ on :
5
+ workflow_call :
6
+ inputs :
7
+ SINK_CONNECTOR_IMAGE :
8
+ description : " Lightweight connector docker image"
9
+ required : true
10
+ type : string
11
+ package :
12
+ description : " Package either 'docker://' or 'https://'. Example: 'https://s3.amazonaws.com/clickhouse-builds/23.3/.../package_release/clickhouse-common-static_23.3.1.64_amd64.deb', or 'docker://altinity/clickhouse-server:23.8.8'"
13
+ type : string
14
+ default : docker://clickhouse/clickhouse-server:23.8
15
+ output_format :
16
+ description : " Testflows output style."
17
+ type : string
18
+ default : new-fails
19
+ extra_args :
20
+ description : " Extra arguments for the tests."
21
+ required : false
22
+ type : string
23
+ default : " "
24
+ artifact_suffix :
25
+ description : " Artifact sufix"
26
+ required : false
27
+ type : string
28
+ default : " "
29
+ secrets :
30
+ DOCKERHUB_USERNAME :
31
+ required : false
32
+ DOCKERHUB_TOKEN :
33
+ required : false
34
+ AWS_ACCESS_KEY_ID :
35
+ required : false
36
+ AWS_SECRET_ACCESS_KEY :
37
+ required : false
38
+ workflow_dispatch :
39
+ inputs :
40
+ SINK_CONNECTOR_IMAGE :
41
+ description : " Lightweight connector docker image"
42
+ required : true
43
+ type : string
44
+ package :
45
+ description : " Package either 'docker://' or 'https://'. Example: 'https://s3.amazonaws.com/clickhouse-builds/23.3/.../package_release/clickhouse-common-static_23.3.1.64_amd64.deb', or 'docker://altinity/clickhouse-server:23.8.8'"
46
+ type : string
47
+ default : docker://clickhouse/clickhouse-server:23.8
48
+ suite :
49
+ description : " Specific Suite To Run (Default * to run everything)."
50
+ required : false
51
+ type : string
52
+ extra_args :
53
+ description : " Extra arguments for the tests."
54
+ required : false
55
+ type : string
56
+ default : " "
57
+ custom_run_name :
58
+ description : ' Custom run name (optional)'
59
+ required : false
60
+ output_format :
61
+ description : " Testflows output style."
62
+ type : choice
63
+ options :
64
+ - new-fails
65
+ - nice-new-fails
66
+ - brisk-new-fails
67
+ - plain-new-fails
68
+ - pnice-new-fails
69
+ - classic
70
+ - nice
71
+ - fails
72
+ - slick
73
+ - brisk
74
+ - quiet
75
+ - short
76
+ - manual
77
+ - dots
78
+ - progress
79
+ - raw
80
+
81
+ env :
82
+ SINK_CONNECTOR_IMAGE : ${{ inputs.SINK_CONNECTOR_IMAGE }}
83
+
84
+ jobs :
85
+ testflows-lightweight :
86
+ runs-on : [self-hosted, on-demand, type-cax41, image-arm-app-docker-ce]
87
+
88
+ steps :
89
+ - uses : actions/checkout@v2
90
+
91
+ - uses : actions/download-artifact@v4
92
+ if : ${{ github.event.pull_request.head.repo.full_name != 'Altinity/clickhouse-sink-connector' && github.event_name != 'workflow_dispatch' }}
93
+ with :
94
+ name : clickhouse-sink-connector_${{ github.event.number }}-${{ github.sha }}-lt.tar.gz
95
+
96
+ - name : Load Docker image
97
+ if : ${{ github.event.pull_request.head.repo.full_name != 'Altinity/clickhouse-sink-connector' && github.event_name != 'workflow_dispatch' }}
98
+ run : |
99
+ docker load < clickhouse-sink-connector_${{ github.event.number }}-${{ github.sha }}-lt.tar.gz
100
+ docker image ls
101
+
102
+ - name : Runner ssh command
103
+ working-directory : sink-connector/tests/integration
104
+ run : echo "ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null root@$(hostname -I | cut -d ' ' -f 1)"
105
+
106
+ - name : Create a virtual environment
107
+ run : |
108
+ echo "Install Python modules..."
109
+ sudo apt-get clean
110
+ sudo apt-get update
111
+ sudo apt-get install -y python3.12-venv
112
+
113
+ echo "Create and activate Python virtual environment..."
114
+ python3 -m venv venv
115
+ source venv/bin/activate
116
+ echo PATH=$PATH >> $GITHUB_ENV
117
+
118
+ - name : Install all dependencies
119
+ working-directory : sink-connector-lightweight/tests/integration
120
+ run : pip3 install -r requirements.txt
121
+
122
+ - name : Get current date
123
+ id : date
124
+ run : echo "date=$(date +'%Y-%m-%d_%H%M%S')" >> $GITHUB_OUTPUT
125
+
126
+ - name : Add ~./local/bin to the PATH
127
+ if : always()
128
+ working-directory : sink-connector-lightweight/tests/integration
129
+ run : echo ~/.local/bin >> $GITHUB_PATH
130
+
131
+ - name : Run testflows tests
132
+ working-directory : sink-connector-lightweight/tests/integration
133
+ run : python3 -u regression.py --only "/mysql to clickhouse replication/auto table creation/${{ inputs.suite != '' && inputs.suite || '*' }}" --clickhouse-binary-path="${{inputs.package}}" --test-to-end ${{ inputs.extra_args != '' && inputs.extra_args || '' }} --output ${{ inputs.output_format }} --collect-service-logs --attr project="${GITHUB_REPOSITORY}" project.id="$GITHUB_RUN_NUMBER" user.name="$GITHUB_ACTOR" github_actions_run="$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID" sink_version="registry.gitlab.com/altinity-public/container-images/clickhouse_debezium_embedded:latest" s3_url="https://altinity-test-reports.s3.amazonaws.com/index.html#altinity-sink-connector/testflows/${{ steps.date.outputs.date }}_${{github.run.number}}/" --log logs/raw.log
134
+
135
+ - name : Create tfs results report
136
+ if : always()
137
+ working-directory : sink-connector-lightweight/tests/integration/logs
138
+ run : cat raw.log | tfs report results | tfs document convert > report.html
139
+
140
+ - name : Create tfs coverage report
141
+ if : always()
142
+ working-directory : sink-connector-lightweight/tests/integration/logs
143
+ run : cat raw.log | tfs report coverage ../requirements/requirements.py | tfs document convert > coverage.html
144
+
145
+ - name : Upload artifacts to Altinity Test Reports S3 bucket
146
+ if : ${{ github.event.pull_request.head.repo.full_name != 'Altinity/clickhouse-sink-connector' && github.event_name != 'workflow_dispatch' }}
147
+ working-directory : sink-connector-lightweight/tests/integration/logs
148
+ env :
149
+ AWS_ACCESS_KEY_ID : ${{ secrets.AWS_ACCESS_KEY_ID }}
150
+ AWS_SECRET_ACCESS_KEY : ${{ secrets.AWS_SECRET_ACCESS_KEY }}
151
+ AWS_DEFAULT_REGION : ' eu-west-2'
152
+ run : aws s3 cp . s3://altinity-test-reports/altinity-sink-connector/testflows/${{ steps.date.outputs.date }}_sink_lw/ --recursive --exclude "*" --include "*.log" --include "*.html"
153
+
154
+ - uses : actions/upload-artifact@v4
155
+ if : always()
156
+ with :
157
+ name : testflows-sink-connector-lightweight-artefacts-arm${{ inputs.artifact_suffix != '' && '-' || '' }}${{ inputs.artifact_suffix }}
158
+ path : |
159
+ sink-connector-lightweight/tests/integration/logs/*.log
160
+ sink-connector-lightweight/tests/integration/env/auto/configs/*.yml
161
+ if-no-files-found : error
162
+ retention-days : 60
163
+ testflows-lightweight-replicated :
164
+ runs-on : [self-hosted, on-demand, type-cax41, image-arm-app-docker-ce]
165
+
166
+ steps :
167
+ - uses : actions/checkout@v2
168
+
169
+ - uses : actions/download-artifact@v4
170
+ if : ${{ github.event.pull_request.head.repo.full_name != 'Altinity/clickhouse-sink-connector' && github.event_name != 'workflow_dispatch' }}
171
+ with :
172
+ name : clickhouse-sink-connector_${{ github.event.number }}-${{ github.sha }}-lt.tar.gz
173
+
174
+ - name : Load Docker image
175
+ if : ${{ github.event.pull_request.head.repo.full_name != 'Altinity/clickhouse-sink-connector' && github.event_name != 'workflow_dispatch' }}
176
+ run : |
177
+ docker load < clickhouse-sink-connector_${{ github.event.number }}-${{ github.sha }}-lt.tar.gz
178
+ docker image ls
179
+
180
+ - name : Runner ssh command
181
+ working-directory : sink-connector/tests/integration
182
+ run : echo "ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null root@$(hostname -I | cut -d ' ' -f 1)"
183
+
184
+ - name : Create a virtual environment
185
+ run : |
186
+ echo "Install Python modules..."
187
+ sudo apt-get clean
188
+ sudo apt-get update
189
+ sudo apt-get install -y python3.12-venv
190
+
191
+ echo "Create and activate Python virtual environment..."
192
+ python3 -m venv venv
193
+ source venv/bin/activate
194
+ echo PATH=$PATH >> $GITHUB_ENV
195
+
196
+ - name : Install all dependencies
197
+ working-directory : sink-connector-lightweight/tests/integration
198
+ run : pip3 install -r requirements.txt
199
+
200
+ - name : Get current date
201
+ id : date
202
+ run : echo "date=$(date +'%Y-%m-%d_%H%M%S')" >> $GITHUB_OUTPUT
203
+
204
+ - name : Add ~./local/bin to the PATH
205
+ if : always()
206
+ working-directory : sink-connector-lightweight/tests/integration
207
+ run : echo ~/.local/bin >> $GITHUB_PATH
208
+
209
+ - name : Run testflows tests
210
+ working-directory : sink-connector-lightweight/tests/integration
211
+ run : python3 -u regression.py --only "/mysql to clickhouse replication/auto replicated table creation/${{ inputs.suite != '' && inputs.suite || '*' }}" --clickhouse-binary-path="${{inputs.package}}" --test-to-end ${{ inputs.extra_args != '' && inputs.extra_args || '' }} --output ${{ inputs.output_format }} --collect-service-logs --attr project="${GITHUB_REPOSITORY}" project.id="$GITHUB_RUN_NUMBER" user.name="$GITHUB_ACTOR" github_actions_run="$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID" sink_version="registry.gitlab.com/altinity-public/container-images/clickhouse_debezium_embedded:latest" s3_url="https://altinity-test-reports.s3.amazonaws.com/index.html#altinity-sink-connector/testflows/${{ steps.date.outputs.date }}_${{github.run.number}}/" --log logs/raw.log
212
+
213
+ - name : Create tfs results report
214
+ if : always()
215
+ working-directory : sink-connector-lightweight/tests/integration/logs
216
+ run : cat raw.log | tfs report results | tfs document convert > report.html
217
+
218
+ - name : Create tfs coverage report
219
+ if : always()
220
+ working-directory : sink-connector-lightweight/tests/integration/logs
221
+ run : cat raw.log | tfs report coverage ../requirements/requirements.py | tfs document convert > coverage.html
222
+
223
+ - name : Upload artifacts to Altinity Test Reports S3 bucket
224
+ if : ${{ github.event.pull_request.head.repo.full_name != 'Altinity/clickhouse-sink-connector' && github.event_name != 'workflow_dispatch' }}
225
+ working-directory : sink-connector-lightweight/tests/integration/logs
226
+ env :
227
+ AWS_ACCESS_KEY_ID : ${{ secrets.AWS_ACCESS_KEY_ID }}
228
+ AWS_SECRET_ACCESS_KEY : ${{ secrets.AWS_SECRET_ACCESS_KEY }}
229
+ AWS_DEFAULT_REGION : ' eu-west-2'
230
+ run : aws s3 cp . s3://altinity-test-reports/altinity-sink-connector/testflows/${{ steps.date.outputs.date }}_sink_lw/ --recursive --exclude "*" --include "*.log" --include "*.html"
231
+
232
+ - uses : actions/upload-artifact@v4
233
+ if : always()
234
+ with :
235
+ name : testflows-sink-connector-lightweight-replicated-artefacts-arm${{ inputs.artifact_suffix != '' && '-' || '' }}${{ inputs.artifact_suffix }}
236
+ path : |
237
+ sink-connector-lightweight/tests/integration/logs/*.log
238
+ sink-connector-lightweight/tests/integration/env/auto_replicated/configs/*.yml
239
+ if-no-files-found : error
240
+ retention-days : 60
0 commit comments