File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5757 TEST_ALL_PACKAGES : ${{ steps.check-label.outputs.is_full_run }}
5858 run : |
5959 if [ -n "$TARGET_BRANCH" ]; then
60- git fetch origin "$TARGET_BRANCH" --depth=1 || true
60+ git fetch origin "$TARGET_BRANCH" --deepen=200 || true
6161 fi
6262 python3 ci/get_package_shards.py
6363
Original file line number Diff line number Diff line change 7272 PACKAGE_WEIGHTS : ${{ env.PACKAGE_WEIGHTS }}
7373 run : |
7474 if [ -n "$TARGET_BRANCH" ]; then
75- git fetch origin "$TARGET_BRANCH" --depth=1 || true
75+ git fetch origin "$TARGET_BRANCH" --deepen=200 || true
7676 fi
7777 python3 ci/get_package_shards.py
7878
@@ -168,8 +168,8 @@ jobs:
168168 echo "should_evaluate_coverage=true" >> "$GITHUB_OUTPUT"
169169 else
170170 TARGET_BRANCH="${TARGET_BRANCH:-main}"
171- git fetch origin "$TARGET_BRANCH" --depth=1 || true
172- num_files_changed=$(git diff --name-only "origin/${TARGET_BRANCH}" -- ${PACKAGE_DIRS} | wc -l | tr -d ' ')
171+ git fetch origin "$TARGET_BRANCH" --deepen=200 || true
172+ num_files_changed=$(git diff --name-only "origin/${TARGET_BRANCH}... " -- ${PACKAGE_DIRS} | wc -l | tr -d ' ')
173173 if [[ "${num_files_changed}" -gt 0 ]]; then
174174 echo "should_evaluate_coverage=true" >> "$GITHUB_OUTPUT"
175175 else
Original file line number Diff line number Diff line change @@ -108,7 +108,7 @@ def get_packages_to_test():
108108 return all_packages
109109
110110 if build_type == 'presubmit' :
111- git_diff_arg = f"origin/{ target_branch } "
111+ git_diff_arg = f"origin/{ target_branch } ... "
112112 elif build_type == 'continuous' :
113113 git_diff_arg = "HEAD~1.."
114114 else :
Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ if [[ "${TEST_ALL_PACKAGES}" == "true" ]]; then
4545 modified_packages=$( for dir in ${PACKAGE_DIRS} ; do ls -d ${dir} /* / 2> /dev/null; done | cut -d/ -f1,2 | sort -u)
4646elif [[ " ${BUILD_TYPE} " == " presubmit" ]]; then
4747 # Presubmit build: evaluate coverage only for packages modified relative to the target branch
48- modified_packages=$( git diff --name-only " origin/${TARGET_BRANCH} " -- ${PACKAGE_DIRS} 2> /dev/null | cut -d/ -f1,2 | sort -u)
48+ modified_packages=$( git diff --name-only " origin/${TARGET_BRANCH} ... " -- ${PACKAGE_DIRS} 2> /dev/null | cut -d/ -f1,2 | sort -u)
4949else
5050 # Continuous build (post-merge on main): evaluate coverage for packages modified in the last commit
5151 modified_packages=$( git diff --name-only HEAD~1 -- ${PACKAGE_DIRS} 2> /dev/null | cut -d/ -f1,2 | sort -u)
Original file line number Diff line number Diff line change @@ -54,9 +54,9 @@ elif [[ ${BUILD_TYPE} == "presubmit" ]]; then
5454 # For presubmit build, we want to know the difference from the
5555 # common commit in the target branch.
5656 if [ -n " ${TARGET_BRANCH} " ]; then
57- git fetch origin " ${TARGET_BRANCH} " --depth=1 || true
57+ git fetch origin " ${TARGET_BRANCH} " --deepen=200 || true
5858 fi
59- GIT_DIFF_ARG=" origin/${TARGET_BRANCH} "
59+ GIT_DIFF_ARG=" origin/${TARGET_BRANCH} ... "
6060
6161elif [[ ${BUILD_TYPE} == " continuous" ]]; then
6262 # For continuous build, we want to know the difference in the last
You can’t perform that action at this time.
0 commit comments