Skip to content

Commit cae3056

Browse files
committed
Compare against main
1 parent 0ee07f3 commit cae3056

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

.github/workflows/build-check-install.yaml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -527,9 +527,10 @@ jobs:
527527
uses: tj-actions/changed-files@v45
528528
with:
529529
path: ${{ github.event.repository.name }}/${{ inputs.package-subdirectory }}
530+
base_sha: "main"
530531
files: |
531-
tests/testthat/**.R
532-
R/**.R
532+
tests/testthat/*.R
533+
R/*.R
533534
534535
- name: Check only affected modules 🎯
535536
if: inputs.fast-tests == true
@@ -558,6 +559,15 @@ jobs:
558559
exit 0
559560
} fi
560561
562+
# Set default TESTING_DEPTH
563+
td=$TESTING_DEPTH
564+
if [ -z "$td" ]
565+
then {
566+
echo "No TESTING_DEPTH default"
567+
td=5
568+
} fi
569+
570+
echo "$ALL_CHANGED_FILES"
561571
# Loop through each modified file and determine which tests to run
562572
for file in $ALL_CHANGED_FILES; do
563573
@@ -569,7 +579,6 @@ jobs:
569579
base_name=$(basename "$file" .R | sed s/test-shinytest2-//g)
570580
# Find matching test files (parenthesis to not match arguments)
571581
test_files=$(grep -l "$base_name(" "$test_dir"test-shinytest2-*.R)
572-
td=$TESTING_DEPTH
573582
574583
# Modify in place so that only modified modules are tested.
575584
if [ -n "$test_files" ];
@@ -594,8 +603,8 @@ jobs:
594603
done
595604
596605
# https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/workflow-commands-for-github-actions#setting-an-environment-variable
597-
echo "TESTING_DEPTH=${TESTING_DEPTH}" >> "$GITHUB_ENV"
598606
echo Using "TESTING_DEPTH=${TESTING_DEPTH}"
607+
echo "TESTING_DEPTH=${TESTING_DEPTH}" >> "$GITHUB_ENV"
599608
shell: bash
600609

601610
- name: Build R package 🏗

0 commit comments

Comments
 (0)