Skip to content

Commit 5e4b801

Browse files
authored
Test are triggered now on more changes. (apache#9646)
Sometimes tests were not triggered when they should be. This change will cause the tests to be triggered when anything changes in "airflow" or "charts" additionally to what we had before.
1 parent be6ed86 commit 5e4b801

File tree

1 file changed

+19
-18
lines changed

1 file changed

+19
-18
lines changed

.github/workflows/ci.yml

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -155,26 +155,27 @@ jobs:
155155
run: |
156156
./scripts/ci/ci_prepare_and_test_backport_packages.sh
157157
158-
pyfiles:
158+
trigger-tests:
159159
timeout-minutes: 10
160160
name: "Count changed important files"
161161
runs-on: ubuntu-latest
162162
outputs:
163-
count: ${{ steps.pyfiles.outputs.count }}
163+
count: ${{ steps.trigger-tests.outputs.count }}
164164
steps:
165165
- uses: actions/checkout@master
166166
- name: "Get count of changed python files"
167167
run: |
168168
set +e
169169
./scripts/ci/ci_count_changed_files.sh ${GITHUB_SHA} \
170-
'\.py$|.github/workflows/|^Dockerfile|^scripts'
170+
'^airflow|.github/workflows/|^Dockerfile|^scripts|^chart'
171171
echo "::set-output name=count::$?"
172-
id: pyfiles
172+
id: trigger-tests
173+
173174
tests-kubernetes:
174175
timeout-minutes: 80
175176
name: "K8s: ${{matrix.kube-mode}} ${{matrix.python-version}} ${{matrix.kubernetes-version}}"
176177
runs-on: ubuntu-latest
177-
needs: [static-checks-1, static-checks-2, pyfiles]
178+
needs: [static-checks-1, static-checks-2, trigger-tests]
178179
strategy:
179180
matrix:
180181
python-version: [3.6, 3.7]
@@ -200,8 +201,8 @@ jobs:
200201
KUBERNETES_VERSION: "${{ matrix.kubernetes-version }}"
201202
KIND_VERSION: "${{ matrix.kind-version }}"
202203
HELM_VERSION: "${{ matrix.helm-version }}"
203-
# For pull requests only run tests when python files changed
204-
if: needs.pyfiles.outputs.count != '0' || github.event_name != 'pull_request'
204+
# For pull requests only run tests when important files changed
205+
if: needs.trigger-tests.outputs.count != '0' || github.event_name != 'pull_request'
205206
steps:
206207
- uses: actions/checkout@master
207208
- uses: actions/setup-python@v1
@@ -239,7 +240,7 @@ ${{ hashFiles('requirements/requirements-python${{matrix.python-version}}.txt')
239240
timeout-minutes: 80
240241
name: "${{matrix.test-type}}:Pg${{matrix.postgres-version}},Py${{matrix.python-version}}"
241242
runs-on: ubuntu-latest
242-
needs: [static-checks-1, static-checks-2, pyfiles]
243+
needs: [static-checks-1, static-checks-2, trigger-tests]
243244
strategy:
244245
matrix:
245246
python-version: [3.6, 3.7, 3.8]
@@ -253,8 +254,8 @@ ${{ hashFiles('requirements/requirements-python${{matrix.python-version}}.txt')
253254
RUN_TESTS: "true"
254255
CI_JOB_TYPE: "Tests"
255256
TEST_TYPE: ${{ matrix.test-type }}
256-
# For pull requests only run tests when python files changed
257-
if: needs.pyfiles.outputs.count != '0' || github.event_name != 'pull_request'
257+
# For pull requests only run tests when important files changed
258+
if: needs.trigger-tests.outputs.count != '0' || github.event_name != 'pull_request'
258259
steps:
259260
- uses: actions/checkout@master
260261
- uses: actions/setup-python@v1
@@ -271,7 +272,7 @@ ${{ hashFiles('requirements/requirements-python${{matrix.python-version}}.txt')
271272
timeout-minutes: 80
272273
name: "${{matrix.test-type}}:MySQL${{matrix.mysql-version}}, Py${{matrix.python-version}}"
273274
runs-on: ubuntu-latest
274-
needs: [static-checks-1, static-checks-2, pyfiles]
275+
needs: [static-checks-1, static-checks-2, trigger-tests]
275276
strategy:
276277
matrix:
277278
python-version: [3.6, 3.7, 3.8]
@@ -285,8 +286,8 @@ ${{ hashFiles('requirements/requirements-python${{matrix.python-version}}.txt')
285286
RUN_TESTS: "true"
286287
CI_JOB_TYPE: "Tests"
287288
TEST_TYPE: ${{ matrix.test-type }}
288-
# For pull requests only run tests when python files changed
289-
if: needs.pyfiles.outputs.count != '0' || github.event_name != 'pull_request'
289+
# For pull requests only run tests when important files changed
290+
if: needs.trigger-tests.outputs.count != '0' || github.event_name != 'pull_request'
290291
steps:
291292
- uses: actions/checkout@master
292293
- uses: actions/setup-python@v1
@@ -303,7 +304,7 @@ ${{ hashFiles('requirements/requirements-python${{matrix.python-version}}.txt')
303304
timeout-minutes: 80
304305
name: "${{matrix.test-type}}:Sqlite Py${{matrix.python-version}}"
305306
runs-on: ubuntu-latest
306-
needs: [static-checks-1, static-checks-2, pyfiles]
307+
needs: [static-checks-1, static-checks-2, trigger-tests]
307308
strategy:
308309
matrix:
309310
python-version: [3.6, 3.7, 3.8]
@@ -316,7 +317,7 @@ ${{ hashFiles('requirements/requirements-python${{matrix.python-version}}.txt')
316317
RUN_TESTS: "true"
317318
CI_JOB_TYPE: "Tests"
318319
# For pull requests only run tests when python files changed
319-
if: needs.pyfiles.outputs.count != '0' || github.event_name != 'pull_request'
320+
if: needs.trigger-tests.outputs.count != '0' || github.event_name != 'pull_request'
320321
steps:
321322
- uses: actions/checkout@master
322323
- uses: actions/setup-python@v1
@@ -334,7 +335,7 @@ ${{ hashFiles('requirements/requirements-python${{matrix.python-version}}.txt')
334335
name: "${{matrix.test-type}}:Pg${{matrix.postgres-version}},Py${{matrix.python-version}}"
335336
runs-on: ubuntu-latest
336337
continue-on-error: true
337-
needs: [static-checks-1, static-checks-2, pyfiles]
338+
needs: [static-checks-1, static-checks-2, trigger-tests]
338339
strategy:
339340
matrix:
340341
python-version: [3.6]
@@ -348,8 +349,8 @@ ${{ hashFiles('requirements/requirements-python${{matrix.python-version}}.txt')
348349
RUN_TESTS: "true"
349350
CI_JOB_TYPE: "Tests"
350351
TEST_TYPE: ${{ matrix.test-type }}
351-
# For pull requests only run tests when python files changed
352-
if: needs.pyfiles.outputs.count != '0' || github.event_name != 'pull_request'
352+
# For pull requests only run tests when important files changed
353+
if: needs.trigger-tests.outputs.count != '0' || github.event_name != 'pull_request'
353354
steps:
354355
- uses: actions/checkout@master
355356
- uses: actions/setup-python@v1

0 commit comments

Comments
 (0)