Skip to content

Commit d083ce3

Browse files
authored
Setup Firestore code coverage tests. (#7518)
1 parent ff0ea54 commit d083ce3

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

.github/workflows/test_coverage.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ jobs:
137137
needs: check
138138
# Don't run on private repo unless it is a PR.
139139
# Disable Firestore for now since Firestore currently does not have unit tests in podspecs.
140-
if: always() && github.repository == 'Firebase/firebase-ios-sdk' && (needs.check.outputs.firestore_run_job == 'true'|| github.event.pull_request.merged) && false
140+
if: always() && github.repository == 'Firebase/firebase-ios-sdk' && (needs.check.outputs.firestore_run_job == 'true'|| github.event.pull_request.merged)
141141
runs-on: macOS-latest
142142
strategy:
143143
matrix:

scripts/build.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,7 @@ case "$product-$platform-$method" in
316316
RunXcodebuild \
317317
-workspace 'Firestore/Example/Firestore.xcworkspace' \
318318
-scheme "Firestore_IntegrationTests_$platform" \
319+
-enableCodeCoverage YES \
319320
"${xcb_flags[@]}" \
320321
build \
321322
test

scripts/code_coverage_report/pod_test_code_coverage_report.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ fi
2626
if [ $SDK == "FirebasePerformance" ]; then
2727
scripts/setup_bundler.sh
2828
scripts/third_party/travis/retry.sh scripts/build.sh Performance ${platform} unit
29+
elif [ $SDK == "FirebaseFirestore" ]; then
30+
scripts/install_prereqs.sh Firestore ${platform} xcodebuild
31+
scripts/third_party/travis/retry.sh scripts/build.sh Firestore ${platform} xcodebuild
2932
else
3033
# Run unit tests of pods and put xcresult bundles into output_path, which
3134
# should be a targeted dir of actions/upload-artifact in workflows.

0 commit comments

Comments
 (0)