Skip to content

Commit

Permalink
Remove TESTING_DEPTH override
Browse files Browse the repository at this point in the history
Signed-off-by: cicdguy <[email protected]>
  • Loading branch information
cicdguy authored Mar 21, 2024
1 parent 5979711 commit 1be2443
Showing 1 changed file with 0 additions and 25 deletions.
25 changes: 0 additions & 25 deletions .github/workflows/build-check-install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -225,10 +225,6 @@ jobs:
ref: ${{ steps.branch-name.outputs.head_ref_branch }}
path: ${{ github.event.repository.name }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
# When fetch-depth is set to 1 (default), and if additional commits are added
# to the branch between this step and the 'Set TESTING_DEPTH' step, git might fail
# referencing ${{ github.event.after }} commit
# because it's not the latest commit fetched by this step.
fetch-depth: 0

- name: Checkout repo 🛎
Expand Down Expand Up @@ -427,27 +423,6 @@ jobs:
R CMD build ${{ github.event.repository.name }}/${{ inputs.package-subdirectory }}
shell: bash

- name: Set TESTING_DEPTH ⚙
env:
COMMIT_NEWEST_MESSAGE: ${{ github.event.head_commit.message }}
COMMIT_OLDEST_MESSAGE: ${{ github.event.commits[0].message }}
run: |
# set TESTING_DEPTH for PR
if [[ ! -z "${GITHUB_HEAD_REF}" ]]; then
TESTING_DEPTH=3
echo "TESTING_DEPTH=3" >> $GITHUB_ENV
COMMIT_NEWEST_MESSAGE=$(git log --format=%B -n 1 ${{ github.event.after }})
fi
if [[ $COMMIT_NEWEST_MESSAGE == *"[skip tests]"* ]]; then
echo "NO_TESTS=1" >> $GITHUB_ENV
fi
# default TESTING_DEPTH
if [[ -z "${TESTING_DEPTH}" ]]; then
echo "TESTING_DEPTH=1" >> $GITHUB_ENV
fi
shell: bash
working-directory: ${{ github.event.repository.name }}/${{ inputs.package-subdirectory }}

- name: Run R CMD check 🏁
run: |
if [ "${{ inputs.skip-r-cmd-check }}" == "true" ]
Expand Down

0 comments on commit 1be2443

Please sign in to comment.