@@ -164,6 +164,9 @@ jobs:
164
164
shell : bash
165
165
command : pip install -r scripts/gha/python_requirements.txt
166
166
- id : matrix_config
167
+ env :
168
+ HEAD_REF : ${{github.event.pull_request.head.ref}}
169
+ BASE_REF : ${{github.event.pull_request.base.ref}}
167
170
run : |
168
171
if [[ "${{ steps.set_outputs.outputs.requested_tests }}" == "expanded" ]]; then
169
172
TEST_MATRIX_PARAM=-e=1
@@ -174,12 +177,12 @@ jobs:
174
177
elif [[ "${{ steps.set_outputs.outputs.requested_tests }}" == "auto" ]]; then
175
178
# auto-diff only apply when running in a PR.
176
179
# 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)
178
181
# If origin/<branch> is no longer valid, then just run all tests.
179
182
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}"
183
186
fi
184
187
fi
185
188
@@ -188,12 +191,13 @@ jobs:
188
191
if [[ "${{ github.event.schedule }}" == "0 9 * * *" ]]; then
189
192
# at 1am PST/2am PDT. Running integration tests and generate test report for all testapps except firestore
190
193
apis="analytics,app_check,auth,database,dynamic_links,functions,gma,installations,messaging,remote_config,storage"
194
+ echo "::warning ::Running main nightly tests"
191
195
elif [[ "${{ github.event.schedule }}" == "0 10 * * *" || "${{ github.event.schedule }}" == "0 11 * * *" ]]; then
192
196
# at 2am PST/3am PDT and 3am PST/4am PDT. Running integration tests for firestore and generate test report
6250
.
193
197
echo "::warning ::Running Firestore nightly tests"
194
198
apis="firestore"
195
199
else
196
- echo "::warning ::Running main nightly tests"
200
+ echo "::warning ::Running pull request tests"
197
201
apis=$( python scripts/gha/print_matrix_configuration.py -c -w integration_tests -k apis -o "${{github.event.inputs.apis}}" ${TEST_MATRIX_PARAM} )
198
202
fi
199
203
if [[ "${{ github.event.schedule }}" == "0 11 * * *" ]]; then
0 commit comments