@@ -175,7 +175,12 @@ jobs:
175
175
${{ env.FDC_FIREBASE_COMMAND }} emulators:start --only=auth >firebase.emulator.auth.log 2>&1 &
176
176
177
177
- name : Gradle connectedCheck
178
+ id : connectedCheck
178
179
uses : reactivecircus/android-emulator-runner@v2
180
+ # Allow this GitHub Actions "job" to continue even if the tests fail so that logs from a
181
+ # failed test run get uploaded as "artifacts" and are available to investigate failed runs.
182
+ # A later step in this "job" will fail the job if this step fails
183
+ continue-on-error : true
179
184
with :
180
185
api-level : ${{ env.FDC_ANDROID_EMULATOR_API_LEVEL }}
181
186
arch : x86_64
@@ -185,21 +190,28 @@ jobs:
185
190
script : |
186
191
set -eux && ./gradlew ${{ (inputs.gradleInfoLog && '--info') || '' }} :firebase-dataconnect:connectedCheck :firebase-dataconnect:connectors:connectedCheck
187
192
188
- - uses : actions/upload-artifact@v4
189
- if : true
193
+ - name : Upload log file artifacts
194
+ uses : actions/upload-artifact@v4
190
195
with :
191
196
name : logs
192
197
path : " **/*.log"
193
198
if-no-files-found : warn
194
199
compression-level : 9
195
200
196
- - uses : actions/upload-artifact@v4
201
+ - name : Upload Gradle build report artifacts
202
+ uses : actions/upload-artifact@v4
197
203
with :
198
204
name : gradle_build_reports
199
205
path : firebase-dataconnect/**/build/reports/
200
206
if-no-files-found : warn
201
207
compression-level : 9
202
208
209
+ - name : Check test result
210
+ if : steps.connectedCheck.outcome != 'success'
211
+ run : |
212
+ echo "Failing the job since the connectedCheck step failed"
213
+ exit 1
214
+
203
215
# Check this yml file with "actionlint": https://github.com/rhysd/actionlint
204
216
# To run actionlint yourself, run `brew install actionlint` followed by
205
217
# `actionlint .github/workflows/dataconnect.yml`
0 commit comments