File tree Expand file tree Collapse file tree 1 file changed +16
-3
lines changed
Expand file tree Collapse file tree 1 file changed +16
-3
lines changed Original file line number Diff line number Diff line change 250250 description : |
251251 Should shinytests2 tests only run per modified teal module? If enabled if only there is a module modificated only that shinytest2 file will be tested.
252252 required : false
253- type : string
253+ type : boolean
254254 default : false
255255
256256concurrency :
@@ -521,18 +521,31 @@ jobs:
521521 key : additional-caches-${{ runner.os }}
522522
523523 - name : Check only affected modules 🎯
524- if : ${{ inputs.fast-tests }} == 'true' && github.event_name == 'pull_request'
524+ if : inputs.fast-tests == 'true' && github.event_name == 'pull_request'
525525 run : |
526526 # Set working directory where the git repo is
527527 cd ${{ github.event.repository.name }}/${{ inputs.package-subdirectory }}
528528
529- test_all=$(git show -s --pretty=%B | grep -F "[run-all-tests]" )
529+ # Exit early if tag is on commit message even if it set to true
530+ test_all=$( git log -1 --pretty=%B | grep -F "[run-all-tests]" )
531+ if [ -z "$test_all" ]
532+ then {
533+ echo "Last commit message forces to test everything."
534+ exit 0
535+ } fi
536+
530537 test_dir="tests/testthat/"
531538
532539 # Get the list of R files that have changed
533540 # https://github.com/cloudnativeto/envoy/blob/de67446fa8af973761bb4716f5143d73643baf8b/.github/workflows/get_build_targets.sh_bak#L9
534541 files=$(git diff --name-only HEAD FETCH_HEAD -- $test_dir R/*.R)
535542
543+ if [ -n "files" ]
544+ then {
545+ echo "No R files affected: test everything."
546+ exit 0
547+ } fi
548+
536549 # Loop through each modified file and determine which tests to run
537550 for file in $files; do
538551
You can’t perform that action at this time.
0 commit comments