Skip to content

Commit 95249a6

Browse files
committed
redirect git clones to use local files
1 parent 39a6954 commit 95249a6

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

ci/run_conditional_tests.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,14 @@ set -eo pipefail
3636
export PROJECT_ROOT=$(realpath $(dirname "${BASH_SOURCE[0]}")/..)
3737
TARGET_BRANCH="${TARGET_BRANCH:-main}"
3838

39+
# Redirect git clones for core dependencies to the local repository.
40+
# This serves two purposes:
41+
# 1. Performance: Avoids repeated 100MB+ downloads of the monorepo for each dependency.
42+
# 2. Correctness: Ensures that changes in core packages (like google-api-core) are
43+
# tested against downstream packages in the same Pull Request.
44+
git -C "${PROJECT_ROOT}" config url."${PROJECT_ROOT}".insteadOf "https://github.com/googleapis/google-cloud-python"
45+
git -C "${PROJECT_ROOT}" config url."${PROJECT_ROOT}".insteadOf "https://github.com/googleapis/google-cloud-python.git"
46+
3947
# A script file for running the test in a sub project.
4048
test_script="${PROJECT_ROOT}/ci/run_single_test.sh"
4149

0 commit comments

Comments
 (0)