@@ -153,108 +153,6 @@ jobs:
153
153
env :
154
154
FORCE_COLOR : 2
155
155
156
- test-openapi-client :
157
- timeout-minutes : 10
158
- name : " Test OpenAPI client"
159
- runs-on : ${{ fromJSON(inputs.runs-on-as-json-public) }}
160
- if : inputs.needs-api-codegen == 'true'
161
- steps :
162
- - name : " Cleanup repo"
163
- shell : bash
164
- run : docker run -v "${GITHUB_WORKSPACE}:/workspace" -u 0:0 bash -c "rm -rf /workspace/*"
165
- - name : " Checkout ${{ github.ref }} ( ${{ github.sha }} )"
166
- uses : actions/checkout@v4
167
- with :
168
- fetch-depth : 2
169
- persist-credentials : false
170
- - name : " Cleanup docker"
171
- run : ./scripts/ci/cleanup_docker.sh
172
- - name : " Checkout ${{ github.ref }} ( ${{ github.sha }} )"
173
- uses : actions/checkout@v4
174
- with :
175
- repository : " apache/airflow-client-python"
176
- fetch-depth : 1
177
- persist-credentials : false
178
- path : ./airflow-client-python
179
- - name : " Install Breeze"
180
- uses : ./.github/actions/breeze
181
- - name : " Generate client with breeze"
182
- run : >
183
- breeze release-management prepare-python-client --package-format both
184
- --version-suffix-for-pypi dev0 --python-client-repo ./airflow-client-python
185
- - name : " Show diff"
186
- run : git diff --color HEAD
187
- working-directory : ./airflow-client-python
188
- - name : Install hatch
189
- run : |
190
- python -m pip install --upgrade uv
191
- uv tool install hatch
192
- - name : Run tests
193
- run : hatch run run-coverage
194
- env :
195
- HATCH_ENV : " test"
196
- working-directory : ./clients/python
197
- - name : " Install source version of required packages"
198
- run : |
199
- breeze release-management prepare-provider-packages \
200
- fab \
201
- standard \
202
- common.sql \
203
- sqlite \
204
- --package-format wheel \
205
- --skip-tag-check \
206
- --version-suffix-for-pypi dev0
207
- pip install . \
208
- dist/apache_airflow_providers_fab-*.whl \
209
- dist/apache_airflow_providers_standard-*.whl \
210
- dist/apache_airflow_providers_common_sql-*.whl \
211
- dist/apache_airflow_providers_sqlite-*.whl
212
- breeze release-management prepare-task-sdk-package --package-format wheel
213
- pip install ./dist/apache_airflow_task_sdk-*.whl
214
- - name : " Install Python client"
215
- run : pip install ./dist/apache_airflow_client-*.whl
216
- - name : " Initialize Airflow DB and start webserver"
217
- run : |
218
- airflow db init
219
- # Let scheduler runs a few loops and get all DAG files from example DAGs serialized to DB
220
- airflow scheduler --num-runs 100
221
- airflow users create --username admin --password admin --firstname Admin --lastname Admin \
222
- --role Admin --email [email protected]
223
- killall python || true # just in case there is a webserver running in the background
224
- nohup airflow webserver --port 8080 &
225
- echo "Started webserver"
226
- env :
227
- AIRFLOW__API__AUTH_BACKENDS : >-
228
- airflow.api.auth.backend.session,airflow.providers.fab.auth_manager.api.auth.backend.basic_auth
229
- AIRFLOW__WEBSERVER__EXPOSE_CONFIG : " True"
230
- AIRFLOW__CORE__LOAD_EXAMPLES : " True"
231
- AIRFLOW_HOME : " ${{ github.workspace }}/airflow_home"
232
- - name : " Waiting for the webserver to be available"
233
- run : |
234
- timeout 30 bash -c 'until nc -z $0 $1; do echo "sleeping"; sleep 1; done' localhost 8080
235
- sleep 5
236
- - name : " Run test python client"
237
- run : python ./clients/python/test_python_client.py
238
- env :
239
- FORCE_COLOR : " standard"
240
- - name : " Stop running webserver"
241
- run : killall python || true # just in case there is a webserver running in the background
242
- if : always()
243
- - name : " Upload python client packages"
244
- uses : actions/upload-artifact@v4
245
- with :
246
- name : python-client-packages
247
- path : ./dist/apache_airflow_client-*
248
- retention-days : 7
249
- if-no-files-found : error
250
- - name : " Upload logs from failed tests"
251
- uses : actions/upload-artifact@v4
252
- if : failure()
253
- with :
254
- name : python-client-failed-logs
255
- path : " ${{ github.workspace }}/airflow_home/logs"
256
- retention-days : 7
257
-
258
156
# Those checks are run if no image needs to be built for checks. This is for simple changes that
259
157
# Do not touch any of the python code or any of the important files that might require building
260
158
# The CI Docker image and they can be run entirely using the pre-commit virtual environments on host
0 commit comments