ci(all): turn on testing significant changes since last merge
This now correctly tracks significant changes from the latest PR merged into master.
@@ -107,7 +107,7 @@ exit_code=0
if [[ $KOKORO_JOB_NAME == *"continuous"* ]]; then
# Continuous jobs only run root tests & tests in submodules changed by the PR
- SIGNIFICANT_CHANGES=$(git --no-pager diff --name-only master..HEAD | grep -Ev '(\.md$|^\.github)' || true)
+ SIGNIFICANT_CHANGES=$(git --no-pager diff --name-only $KOKORO_GIT_COMMIT^ | grep -Ev '(\.md$|^\.github)' || true)
# CHANGED_DIRS is the list of significant top-level directories that changed,
# but weren't deleted by the current PR. CHANGED_DIRS will be empty when run on master.
CHANGED_DIRS=$(echo "$SIGNIFICANT_CHANGES" | tr ' ' '\n' | grep "/" | cut -d/ -f1 | sort -u | tr '\n' ' ' | xargs ls -d 2>/dev/null || true)
