فهرست منبع

Setup Firestore code coverage tests. (#7518)

Gran 5 سال پیش
والد
کامیت
d083ce342c
3فایلهای تغییر یافته به همراه5 افزوده شده و 1 حذف شده
  1. 1 1
      .github/workflows/test_coverage.yml
  2. 1 0
      scripts/build.sh
  3. 3 0
      scripts/code_coverage_report/pod_test_code_coverage_report.sh

+ 1 - 1
.github/workflows/test_coverage.yml

@@ -137,7 +137,7 @@ jobs:
     needs: check
     # Don't run on private repo unless it is a PR.
     # Disable Firestore for now since Firestore currently does not have unit tests in podspecs.
-    if: always() && github.repository == 'Firebase/firebase-ios-sdk' && (needs.check.outputs.firestore_run_job == 'true'|| github.event.pull_request.merged) && false
+    if: always() && github.repository == 'Firebase/firebase-ios-sdk' && (needs.check.outputs.firestore_run_job == 'true'|| github.event.pull_request.merged)
     runs-on: macOS-latest
     strategy:
       matrix:

+ 1 - 0
scripts/build.sh

@@ -316,6 +316,7 @@ case "$product-$platform-$method" in
     RunXcodebuild \
         -workspace 'Firestore/Example/Firestore.xcworkspace' \
         -scheme "Firestore_IntegrationTests_$platform" \
+        -enableCodeCoverage YES \
         "${xcb_flags[@]}" \
         build \
         test

+ 3 - 0
scripts/code_coverage_report/pod_test_code_coverage_report.sh

@@ -26,6 +26,9 @@ fi
 if [ $SDK == "FirebasePerformance" ]; then
   scripts/setup_bundler.sh
   scripts/third_party/travis/retry.sh scripts/build.sh Performance ${platform} unit
+elif [ $SDK == "FirebaseFirestore" ]; then
+  scripts/install_prereqs.sh Firestore ${platform} xcodebuild
+  scripts/third_party/travis/retry.sh scripts/build.sh Firestore ${platform} xcodebuild
 else
   # Run unit tests of pods and put xcresult bundles into output_path, which
   # should be a targeted dir of actions/upload-artifact in workflows.