ci: fail if Firebase Test Lab reports no test case results

gcloud exits 0 even when no tests ran. Add a post-check that greps
the output for 'Passed/passed/test cases' and fails explicitly if
none are found, so 'no test case results' turns the CI red.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Thomas SharedInbox
2026-05-22 08:58:09 +02:00
co-authored by Claude Sonnet 4.6
parent ec195271c8
commit 92f3e30e00
+3 -2
View File
@@ -652,12 +652,13 @@ func (m *Ci) TestAndroidFirebase(
gcloud auth activate-service-account --key-file=/tmp/key.json && \
rm /tmp/key.json && \
gcloud config set project "$FIREBASE_PROJECT_ID" && \
gcloud firebase test android run \
out=$(gcloud firebase test android run \
--type instrumentation \
--app /apks/app-debug.apk \
--test /apks/app-debug-androidTest.apk \
--device model=oriole,version=33,locale=en,orientation=portrait \
--results-bucket=gs://sharedinbox-ftl-results`}).
--results-bucket=gs://sharedinbox-ftl-results 2>&1) && echo "$out" || { echo "$out"; exit 1; } && \
echo "$out" | grep -qE 'Passed|passed|test cases' || { echo "ERROR: no test case results reported — tests did not run"; exit 1; }`}).
Stdout(ctx)
}