diff --git a/.github/workflows/lint_test.yml b/.github/workflows/lint_test.yml index a5655ec5..25891a13 100644 --- a/.github/workflows/lint_test.yml +++ b/.github/workflows/lint_test.yml @@ -29,6 +29,7 @@ env: POETRY_CACHE_DIR: ${{ github.workspace }}/.cache/py-user-base PYTHONUSERBASE: ${{ github.workspace }}/.cache/py-user-base PRE_COMMIT_HOME: ${{ github.workspace }}/.cache/pre-commit-cache + GIT_REF: ${{ github.head_ref }} jobs: lint: @@ -46,6 +47,10 @@ jobs: # Checks out the repository in the current folder. - name: Checks out repository uses: actions/checkout@v2 + with: + fetch-depth: 2 + ref: ${{ env.GIT_REF }} + # Set up the right version of Python - name: Set up Python ${{ env.PYTHON_VERSION }} @@ -127,6 +132,9 @@ jobs: # Checks out the repository in the current folder. - name: Checks out repository uses: actions/checkout@v2 + with: + fetch-depth: 2 + ref: ${{ env.GIT_REF }} # Set up the right version of Python - name: Set up Python ${{ env.PYTHON_VERSION }}