Skip to content

Commit b6adc0b

Browse files
committed
Fix Storage Integration Test CI
1 parent 724caed commit b6adc0b

File tree

3 files changed

+50
-10
lines changed

3 files changed

+50
-10
lines changed

scripts/build.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -496,6 +496,12 @@ case "$product-$platform-$method" in
496496

497497
Storage-*-xcodebuild)
498498
pod_gen FirebaseStorage.podspec --platforms=ios
499+
500+
# Add GoogleService-Info.plist to generated Test Wrapper App.
501+
ruby ./scripts/update_xcode_target.rb gen/FirebaseStorage/Pods/Pods.xcodeproj \
502+
AppHost-FirebaseStorage-Unit-Tests \
503+
../../../FirebaseStorage/Tests/Integration/Resources/GoogleService-Info.plist
504+
499505
if check_secrets; then
500506
# Integration tests are only run on iOS to minimize flake failures.
501507
RunXcodebuild \
@@ -518,6 +524,12 @@ case "$product-$platform-$method" in
518524

519525
StorageSwift-*-xcodebuild)
520526
pod_gen FirebaseStorageSwift.podspec --platforms=ios
527+
528+
# Add GoogleService-Info.plist to generated Test Wrapper App.
529+
ruby ./scripts/update_xcode_target.rb gen/FirebaseStorageSwift/Pods/Pods.xcodeproj \
530+
AppHost-FirebaseStorageSwift-Unit-Tests \
531+
../../../FirebaseStorage/Tests/Integration/Resources/GoogleService-Info.plist
532+
521533
if check_secrets; then
522534
# Integration tests are only run on iOS to minimize flake failures.
523535
RunXcodebuild \

scripts/code_coverage_report/code_coverage_file_list.json

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -46,16 +46,6 @@
4646
"FirebaseFirestore\\.podspec",
4747
"CMakeLists\\.txt",
4848
"cmake/.*",
49-
"scripts/binary_to_array\\.py",
50-
"scripts/build\\.sh",
51-
"scripts/install_prereqs\\.sh",
52-
"scripts/localize_podfile\\.swift",
53-
"scripts/pod_lib_lint\\.rb",
54-
"scripts/run_firestore_emulator\\.sh",
55-
"scripts/setup_[^/]+",
56-
"scripts/sync_project\\.rb",
57-
"scripts/test_quickstart\\.sh",
58-
"scripts/xcresult_logs\\.py",
5949
"\\.github/workflows/firestore\\.yml",
6050
"Gemfile"
6151
]

scripts/update_xcode_target.rb

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
#!/usr/bin/env ruby
2+
3+
# Copyright 2021 Google LLC
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
17+
# Script to add a file to an Xcode target.
18+
# Adapted from https://github.com/firebase/quickstart-ios/blob/master/scripts/info_script.rb
19+
20+
require 'xcodeproj'
21+
project_path = ARGV[0]
22+
target = ARGV[1]
23+
file_name = ARGV[2]
24+
25+
project = Xcodeproj::Project.open(project_path)
26+
27+
# Add a file to the project in the main group
28+
file = project.new_file(file_name)
29+
30+
# Add the file to the all targets
31+
project.targets.each do |t|
32+
if t.to_s == target
33+
t.add_file_references([file])
34+
end
35+
end
36+
37+
#save project
38+
project.save()

0 commit comments

Comments
 (0)