potiuk commented on a change in pull request #11656:
URL: https://github.com/apache/airflow/pull/11656#discussion_r507815811
##########
File path: .github/workflows/ci.yml
##########
@@ -202,12 +228,58 @@ jobs:
env:
VERBOSE: false
+ # Those checks are run if no image needs to be built for checks. This is for
simple changes that
+ # Do not touch any of the python code or any of the important files that
might require building
+ # The CI Docker image and they can be run entirely using the pre-commit
virtual environments on host
+ static-checks-basic-checks-only:
+ timeout-minutes: 30
+ name: "Static checks: basic checks only"
+ runs-on: ubuntu-latest
+ needs: [build-info]
+ env:
+ SKIP: "build,mypy,flake8,pylint,bats-in-container-tests"
+ MOUNT_LOCAL_SOURCES: "true"
+ PYTHON_MAJOR_MINOR_VERSION:
${{needs.build-info.outputs.defaultPythonVersion}}
+ if: >
+ needs.build-info.outputs.basic-checks-only == 'true' &&
+ (github.repository == 'apache/airflow' || github.event_name !=
'schedule')
+ steps:
+ - name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
+ uses: actions/checkout@v2
+ - name: "Setup python"
+ uses: actions/setup-python@v2
+ with:
+ python-version: ${{needs.build-info.outputs.defaultPythonVersion}}
+ - name: Cache pre-commit env
+ uses: actions/cache@v2
+ env:
+ cache-name: cache-pre-commit-master-basic-checks-v1
+ with:
+ path: ~/.cache/pre-commit
+ key: ${{ env.cache-name }}-${{ github.job }}-${{
hashFiles('.pre-commit-config.yaml') }}
+ - name: "Free space"
+ run: ./scripts/ci/tools/ci_free_space_on_ci.sh
+ - name: >
+ Fetch incoming commit ${{ github.sha }} with its parent
+ uses: actions/checkout@v2
+ with:
+ ref: ${{ github.sha }}
+ fetch-depth: 2
Review comment:
We need to pull in the parent commit as well. By default checkout action
pulls only teh one that is being built and we need the parent to get the list
of changes.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]