This is an automated email from the ASF dual-hosted git repository. eladkal pushed a commit to branch v2-6-test in repository https://gitbox.apache.org/repos/asf/airflow.git
commit 4653cc7b395276fa2a83cd6fe261013ac3a7dcb7 Author: Jarek Potiuk <[email protected]> AuthorDate: Mon Apr 24 08:03:45 2023 +0200 Optimize away pytest collection steps (#30824) The Pytest collection steps are only needed if there are any tests about to be run. There are cases where we build CI images but we do not expect to run any tests (for doc-only changes). This should save about 3 minutes of build time. Also ARM pytest collection should only be executed once for every build after all "regular" tests passed - there is no need to run them for different backends/versions. It is enough to run them for default single backend version (Postgres). (cherry picked from commit 557716aa0215bab9b084e926fe09b779f046ac85) --- .github/workflows/ci.yml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5f0f842bd7..e95fb492f2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -548,6 +548,7 @@ jobs: DEBUG_RESOURCES: ${{needs.build-info.outputs.debug-resources}} - name: "Tests Pytest collection" run: breeze testing tests --run-in-parallel --collect-only + if: needs.build-info.outputs.run-tests == 'true' env: PYTHON_MAJOR_MINOR_VERSION: "${{needs.build-info.outputs.default-python-version}}" BACKEND: sqlite @@ -891,6 +892,7 @@ jobs: run: breeze testing tests --run-in-parallel - name: "Tests ARM Pytest collection: ${{matrix.python-version}}" run: breeze testing tests --run-in-parallel --collect-only --remove-arm-packages + if: matrix.postgres-version == needs.build-info.outputs.default-postgres-version - name: "Post Tests: ${{matrix.python-version}}:${{needs.build-info.outputs.parallel-test-types}}" uses: ./.github/actions/post_tests @@ -1024,9 +1026,6 @@ jobs: uses: ./.github/actions/migration_tests - name: "Tests: ${{matrix.python-version}}:${{needs.build-info.outputs.parallel-test-types}}" run: breeze testing tests --run-in-parallel - - name: "Tests ARM Pytest collection: ${{matrix.python-version}}" - if: env.MYSQL_VERSION != '5.7' - run: breeze testing tests --run-in-parallel --collect-only --remove-arm-packages - name: "Post Tests: ${{matrix.python-version}}:${{needs.build-info.outputs.parallel-test-types}}" uses: ./.github/actions/post_tests @@ -1110,8 +1109,6 @@ jobs: uses: ./.github/actions/migration_tests - name: "Tests: ${{matrix.python-version}}:${{needs.build-info.outputs.parallel-test-types}}" run: breeze testing tests --run-in-parallel - - name: "Tests ARM Pytest collection: ${{matrix.python-version}}" - run: breeze testing tests --run-in-parallel --collect-only --remove-arm-packages - name: "Post Tests: ${{matrix.python-version}}:${{needs.build-info.outputs.parallel-test-types}}" uses: ./.github/actions/post_tests
