File tree Expand file tree Collapse file tree 1 file changed +11
-15
lines changed
Expand file tree Collapse file tree 1 file changed +11
-15
lines changed Original file line number Diff line number Diff line change @@ -521,10 +521,19 @@ jobs:
521521 with :
522522 path : " ${{ inputs.additional-caches }}"
523523 key : additional-caches-${{ runner.os }}
524+ steps :
525+ - name : Get changed files 📃
526+ id : changed-files
527+ uses : tj-actions/changed-files@v45
528+ files : |
529+ tests/testthat/**.R
530+ R/**.R
524531
525532 - name : Check only affected modules 🎯
526533 if : inputs.fast-tests == true
527534 working-directory : ${{ github.event.repository.name }}/${{ inputs.package-subdirectory }}
535+ env :
536+ ALL_CHANGED_FILES : ${{ steps.changed-files.outputs.all_changed_files }}
528537 run : |
529538 # Bash script run
530539 commit_msg=$( git log -1 --pretty=%B )
@@ -540,28 +549,15 @@ jobs:
540549 } fi
541550
542551 test_dir="tests/testthat/"
543- git status
544- git stash
545- git config pull.rebase true
546- remote_repo="https://${GITHUB_ACTOR}:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git"
547- git pull "$remote_repo" main
548- git stash pop
549-
550- git branch
551-
552- # Get the list of R files that have changed
553- # https://github.com/cloudnativeto/envoy/blob/de67446fa8af973761bb4716f5143d73643baf8b/.github/workflows/get_build_targets.sh_bak#L9
554- files=$( git diff main.. --name-only -- "$test_dir"/*.R R/*.R )
555- echo "$files"
556552
557- if [ -z "$files" ]
553+ if [ -z "${ALL_CHANGED_FILES} ]
558554 then {
559555 echo "No R files affected: test everything."
560556 exit 0
561557 } fi
562558
563559 # Loop through each modified file and determine which tests to run
564- for file in $files ; do
560+ for file in "${ALL_CHANGED_FILES}" ; do
565561
566562 echo "Check for $file"
567563
You can’t perform that action at this time.
0 commit comments