Skip to content

Commit eeced5d

Browse files
authored
Fix travis quickstart tests (#5169)
1 parent 58317b5 commit eeced5d

File tree

3 files changed

+23
-10
lines changed

3 files changed

+23
-10
lines changed

.travis.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ jobs:
5959

6060
- stage: test
6161
env:
62-
- PROJECT=ABTesting METHOD=pod-lib-lint QUICKSTART=abtesting
62+
- PROJECT=ABTesting METHOD=pod-lib-lint QUICKSTART=ABtesting
6363
before_install:
6464
- ./scripts/if_changed.sh ./scripts/install_prereqs.sh
6565
script:
@@ -90,7 +90,7 @@ jobs:
9090

9191
- stage: test
9292
env:
93-
- PROJECT=Auth PLATFORM=iOS METHOD=xcodebuild QUICKSTART=authentication
93+
- PROJECT=Auth PLATFORM=iOS METHOD=xcodebuild QUICKSTART=Authentication
9494
before_install:
9595
- ./scripts/if_changed.sh ./scripts/install_prereqs.sh
9696
script:
@@ -160,7 +160,7 @@ jobs:
160160

161161
- stage: test
162162
env:
163-
- PROJECT=Database PLATFORM=all METHOD=xcodebuild QUICKSTART=database
163+
- PROJECT=Database PLATFORM=all METHOD=xcodebuild QUICKSTART=Database
164164
before_install:
165165
- ./scripts/if_changed.sh ./scripts/install_prereqs.sh
166166
script:
@@ -194,7 +194,7 @@ jobs:
194194

195195
- stage: test
196196
env:
197-
- PROJECT=DynamicLinks METHOD=pod-lib-lint QUICKSTART=dynamiclinks
197+
- PROJECT=DynamicLinks METHOD=pod-lib-lint QUICKSTART=DynamicLinks
198198
before_install:
199199
- ./scripts/if_changed.sh ./scripts/install_prereqs.sh
200200
script:
@@ -231,7 +231,7 @@ jobs:
231231

232232
- stage: test
233233
env:
234-
- PROJECT=RemoteConfig METHOD=pod-lib-lint QUICKSTART=config
234+
- PROJECT=RemoteConfig METHOD=pod-lib-lint QUICKSTART=Config
235235
before_install:
236236
- ./scripts/if_changed.sh ./scripts/install_prereqs.sh
237237
script:
@@ -280,7 +280,7 @@ jobs:
280280

281281
- stage: test
282282
env:
283-
- PROJECT=Functions METHOD=pod-lib-lint QUICKSTART=functions
283+
- PROJECT=Functions METHOD=pod-lib-lint QUICKSTART=Functions
284284
before_install:
285285
- ./scripts/if_changed.sh ./scripts/install_prereqs.sh # Start integration test server
286286
script:
@@ -503,7 +503,7 @@ jobs:
503503
- PROJECT=Installations PLATFORM=iOS METHOD=pod-lib-lint
504504
- FIS_ALLOWS_INCOMPATIBLE_IID_VERSION=1
505505
- FIS_INTEGRATION_TESTS_REQUIRED=$(if [[ "$TRAVIS_PULL_REQUEST" == "false" || "$TRAVIS_PULL_REQUEST_SLUG" == "$TRAVIS_REPO_SLUG" ]]; then echo "1"; else echo "0"; fi)
506-
- QUICKSTART=installations
506+
- QUICKSTART=Installations
507507
before_install:
508508
- ./scripts/if_changed.sh ./scripts/install_prereqs.sh
509509
script:

scripts/check_secrets.sh

100644100755
File mode changed.

scripts/setup_quickstart.sh

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,26 @@ if check_secrets; then
4343
bundle update --bundler
4444
bundle install
4545
bundle exec pod install
46-
../scripts/install_prereqs/"$SAMPLE".sh
46+
47+
# Add GoogleService-Info.plist to Xcode project
48+
ruby ../scripts/info_script.rb "${SAMPLE}"
4749

4850
# Secrets are repo specific, so we need to override with the firebase-ios-sdk
4951
# version. GHA manages the secrets in its action script.
52+
PLIST_FILE=$root_dir/Secrets/quickstart-ios/"$SAMPLE"/GoogleService-Info.plist
5053
if [[ -n "${TRAVIS_PULL_REQUEST:-}" ]]; then
51-
cp $root_dir/Secrets/quickstart-ios/"$SAMPLE"/GoogleService-Info.plist ./
52-
cp $root_dir/Secrets/quickstart-ios/TestUtils/FIREGSignInInfo.h ../TestUtils/
54+
if [[ -f "$PLIST_FILE" ]]; then
55+
cp $root_dir/Secrets/quickstart-ios/"$SAMPLE"/GoogleService-Info.plist ./
56+
cp $root_dir/Secrets/quickstart-ios/TestUtils/FIREGSignInInfo.h ../TestUtils/
57+
if [[ ${SAMPLE} == "DynamicLinks" ]]; then
58+
sed -i '' 's#DYNAMIC_LINK_DOMAIN#https://qpf6m.app.goo.gl#' DynamicLinksExample/DynamicLinksExample.entitlements
59+
sed -i '' 's#YOUR_DOMAIN_URI_PREFIX";#https://qpf6m.app.goo.gl";#' DynamicLinksExample/ViewController.m
60+
elif [[ ${SAMPLE} == "Functions" ]]; then
61+
sed -i '' 's/REVERSED_CLIENT_ID/com.googleusercontent.apps.1025801074639-6p6ebi8amuklcjrto20gvpe295smm8u6/' FunctionsExample/Info.plist
62+
fi
63+
else
64+
cp ../mock-GoogleService-Info.plist ./GoogleService-Info.plist
65+
fi
5366
fi
5467
cd -
5568
fi

0 commit comments

Comments
 (0)