Skip to content

Commit

Permalink
Turn on unit test for FirebasePerformance. (#7495)
Browse files Browse the repository at this point in the history
  • Loading branch information
granluo committed Feb 11, 2021
1 parent 1d09fdf commit 00d73a4
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 17 deletions.
24 changes: 12 additions & 12 deletions .github/workflows/test_coverage.yml
Expand Up @@ -45,7 +45,7 @@ jobs:
runs-on: macOS-latest
strategy:
matrix:
target: [ios]
target: [iOS]
steps:
- uses: actions/checkout@v2
- name: Setup Bundler
Expand All @@ -64,7 +64,7 @@ jobs:
runs-on: macOS-latest
strategy:
matrix:
target: [ios]
target: [iOS]
steps:
- uses: actions/checkout@v2
- name: Setup Bundler
Expand All @@ -83,7 +83,7 @@ jobs:
runs-on: macOS-latest
strategy:
matrix:
target: [ios]
target: [iOS]
steps:
- uses: actions/checkout@v2
- name: Setup Bundler
Expand All @@ -102,7 +102,7 @@ jobs:
runs-on: macOS-latest
strategy:
matrix:
target: [ios]
target: [iOS]
steps:
- uses: actions/checkout@v2
- name: Setup Bundler
Expand All @@ -121,7 +121,7 @@ jobs:
runs-on: macOS-latest
strategy:
matrix:
target: [ios]
target: [iOS]
steps:
- uses: actions/checkout@v2
- name: Setup Bundler
Expand All @@ -141,7 +141,7 @@ jobs:
runs-on: macOS-latest
strategy:
matrix:
target: [ios]
target: [iOS]
steps:
- uses: actions/checkout@v2
- name: Setup Bundler
Expand All @@ -160,7 +160,7 @@ jobs:
runs-on: macOS-latest
strategy:
matrix:
target: [ios]
target: [iOS]
steps:
- uses: actions/checkout@v2
- name: Setup Bundler
Expand All @@ -179,7 +179,7 @@ jobs:
runs-on: macOS-latest
strategy:
matrix:
target: [ios]
target: [iOS]
steps:
- uses: actions/checkout@v2
- name: Setup Bundler
Expand All @@ -198,7 +198,7 @@ jobs:
runs-on: macOS-latest
strategy:
matrix:
target: [ios]
target: [iOS]
steps:
- uses: actions/checkout@v2
- name: Setup Bundler
Expand All @@ -217,7 +217,7 @@ jobs:
runs-on: macOS-latest
strategy:
matrix:
target: [ios]
target: [iOS]
steps:
- uses: actions/checkout@v2
- name: Setup Bundler
Expand All @@ -236,7 +236,7 @@ jobs:
runs-on: macOS-latest
strategy:
matrix:
target: [ios]
target: [iOS]
steps:
- uses: actions/checkout@v2
- name: Setup Bundler
Expand All @@ -255,7 +255,7 @@ jobs:
runs-on: macOS-latest
strategy:
matrix:
target: [ios]
target: [iOS]
steps:
- uses: actions/checkout@v2
- name: Setup Bundler
Expand Down
18 changes: 13 additions & 5 deletions scripts/code_coverage_report/pod_test_code_coverage_report.sh
Expand Up @@ -21,9 +21,17 @@ output_path="${3:-${default_output_path}}"
if [ -d "/Users/runner/Library/Developer/Xcode/DerivedData" ]; then
rm -r /Users/runner/Library/Developer/Xcode/DerivedData/*
fi
# Run unit tests of pods and put xcresult bundles into output_path, which
# should be a targeted dir of actions/upload-artifact in workflows.
# In code coverage workflow, files under output_path will be uploaded to
# Github Actions.
scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb "${SDK}".podspec --platforms="${platform}" --test-specs=unit

# Setup for pod unit tests
if [ $SDK == "FirebasePerformance" ]; then
scripts/setup_bundler.sh
scripts/third_party/travis/retry.sh scripts/build.sh Performance ${platform} unit
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.
# In code coverage workflow, files under output_path will be uploaded to
# Github Actions.
scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb "${SDK}".podspec --platforms="$(tr '[:upper:]' '[:lower:]'<<<${platform})" --test-specs=unit
fi

find /Users/runner/Library/Developer/Xcode/DerivedData -type d -regex ".*/.*\.xcresult" -execdir cp -R '{}' "${output_path}" \;

0 comments on commit 00d73a4

Please sign in to comment.