@@ -164,6 +164,9 @@ jobs:
164164 shell : bash
165165 command : pip install -r scripts/gha/python_requirements.txt
166166 - id : matrix_config
167+ env :
168+ HEAD_REF : ${{github.event.pull_request.head.ref}}
169+ BASE_REF : ${{github.event.pull_request.base.ref}}
167170 run : |
168171 if [[ "${{ steps.set_outputs.outputs.requested_tests }}" == "expanded" ]]; then
169172 TEST_MATRIX_PARAM=-e=1
@@ -174,12 +177,12 @@ jobs:
174177 elif [[ "${{ steps.set_outputs.outputs.requested_tests }}" == "auto" ]]; then
175178 # auto-diff only apply when running in a PR.
176179 # diff against the PR's base. "git merge-base main branch_name" will give the common ancestor of both branches.
177- MERGE_BASE=$(git merge-base origin/${{github.event.pull_request.head.ref}} origin/${{github.event.pull_request.base.ref}} || true)
180+ MERGE_BASE=$(git merge-base " origin/${HEAD_REF}" " origin/${BASE_REF}" || true)
178181 # If origin/<branch> is no longer valid, then just run all tests.
179182 if [[ -n "${MERGE_BASE}" ]]; then
180- echo " ::warning ::Auto-diff origin/${{github.event.pull_request.head.ref} }..${MERGE_BASE}"
181- git diff --name-only origin/${{github.event.pull_request.head.ref}} ..${MERGE_BASE}
182- TEST_MATRIX_PARAM="--auto_diff origin/${{github.event.pull_request.head.ref} }..${MERGE_BASE}"
183+ echo ' ::warning ::Auto-diff origin/${HEAD_REF }..${MERGE_BASE}"
184+ git diff --name-only " origin/${HEAD_REF} ..${MERGE_BASE}"
185+ TEST_MATRIX_PARAM="--auto_diff origin/${HEAD_REF }..${MERGE_BASE}"
183186 fi
184187 fi
185188
@@ -188,12 +191,13 @@ jobs:
188191 if [[ "${{ github.event.schedule }}" == "0 9 * * *" ]]; then
189192 # at 1am PST/2am PDT. Running integration tests and generate test report for all testapps except firestore
190193 apis="analytics,app_check,auth,database,dynamic_links,functions,gma,installations,messaging,remote_config,storage"
194+ echo "::warning ::Running main nightly tests"
191195 elif [[ "${{ github.event.schedule }}" == "0 10 * * *" || "${{ github.event.schedule }}" == "0 11 * * *" ]]; then
192196 # at 2am PST/3am PDT and 3am PST/4am PDT. Running integration tests for firestore and generate test report.
193197 echo "::warning ::Running Firestore nightly tests"
194198 apis="firestore"
195199 else
196- echo "::warning ::Running main nightly tests"
200+ echo "::warning ::Running pull request tests"
197201 apis=$( python scripts/gha/print_matrix_configuration.py -c -w integration_tests -k apis -o "${{github.event.inputs.apis}}" ${TEST_MATRIX_PARAM} )
198202 fi
199203 if [[ "${{ github.event.schedule }}" == "0 11 * * *" ]]; then
0 commit comments