Skip to content

Commit ea0d787

Browse files
authored
[Auth] Investigate and fix v11 integration test CI failures (#13254)
1 parent 0acb763 commit ea0d787

File tree

4 files changed

+14
-34
lines changed

4 files changed

+14
-34
lines changed

.github/workflows/auth.yml

+5-2
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,9 @@ jobs:
5757
integration-tests:
5858
# Don't run on private repo unless it is a PR.
5959
if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
60+
strategy:
61+
matrix:
62+
scheme: [ObjCApiTests, SwiftApiTests, AuthenticationExampleUITests]
6063

6164
env:
6265
plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
@@ -84,14 +87,14 @@ jobs:
8487
scripts/decrypt_gha_secret.sh scripts/gha-encrypted/AuthSample/Credentials.swift.gpg \
8588
FirebaseAuth/Tests/SampleSwift/SwiftApiTests/Credentials.swift "$plist_secret"
8689
- name: Xcode
87-
run: sudo xcode-select -s /Applications/Xcode_15.3.app/Contents/Developer
90+
run: sudo xcode-select -s /Applications/Xcode_15.4.app/Contents/Developer
8891
- uses: nick-fields/retry@v3
8992
with:
9093
timeout_minutes: 120
9194
max_attempts: 3
9295
retry_on: error
9396
retry_wait_seconds: 120
94-
command: ([ -z $plist_secret ] || scripts/build.sh Auth iOS)
97+
command: ([ -z $plist_secret ] || scripts/build.sh Auth iOS ${{ matrix.scheme }})
9598

9699
spm:
97100
# Don't run on private repo unless it is a PR.

FirebaseAuth/Tests/SampleSwift/AuthenticationExample.xcodeproj/project.pbxproj

+1-15
Original file line numberDiff line numberDiff line change
@@ -478,7 +478,6 @@
478478
DE8B63702BEC2FB900607B82 /* XCRemoteSwiftPackageReference "GoogleSignIn-iOS" */,
479479
DE8B63752BEC302200607B82 /* XCRemoteSwiftPackageReference "facebook-ios-sdk" */,
480480
DE8B63782BEC342000607B82 /* XCRemoteSwiftPackageReference "gtm-session-fetcher" */,
481-
DEE261C32C21E9F500EECAC5 /* XCRemoteSwiftPackageReference "recaptcha-enterprise-mobile-sdk" */,
482481
);
483482
productRefGroup = EAE4CBC224855E3A00245E92 /* Products */;
484483
projectDirPath = "";
@@ -988,7 +987,7 @@
988987
repositoryURL = "https://github.com/facebook/facebook-ios-sdk";
989988
requirement = {
990989
kind = upToNextMajorVersion;
991-
minimumVersion = 14.1.0;
990+
minimumVersion = 17.0.2;
992991
};
993992
};
994993
DE8B63782BEC342000607B82 /* XCRemoteSwiftPackageReference "gtm-session-fetcher" */ = {
@@ -999,14 +998,6 @@
999998
minimumVersion = 3.4.1;
1000999
};
10011000
};
1002-
DEE261C32C21E9F500EECAC5 /* XCRemoteSwiftPackageReference "recaptcha-enterprise-mobile-sdk" */ = {
1003-
isa = XCRemoteSwiftPackageReference;
1004-
repositoryURL = "https://github.com/GoogleCloudPlatform/recaptcha-enterprise-mobile-sdk.git";
1005-
requirement = {
1006-
kind = upToNextMajorVersion;
1007-
minimumVersion = 18.5.1;
1008-
};
1009-
};
10101001
/* End XCRemoteSwiftPackageReference section */
10111002

10121003
/* Begin XCSwiftPackageProductDependency section */
@@ -1039,11 +1030,6 @@
10391030
package = DE8B63782BEC342000607B82 /* XCRemoteSwiftPackageReference "gtm-session-fetcher" */;
10401031
productName = GTMSessionFetcher;
10411032
};
1042-
DEE261C42C21E9F500EECAC5 /* RecaptchaEnterprise */ = {
1043-
isa = XCSwiftPackageProductDependency;
1044-
package = DEE261C32C21E9F500EECAC5 /* XCRemoteSwiftPackageReference "recaptcha-enterprise-mobile-sdk" */;
1045-
productName = RecaptchaEnterprise;
1046-
};
10471033
/* End XCSwiftPackageProductDependency section */
10481034
};
10491035
rootObject = EAE4CBB924855E3A00245E92 /* Project object */;

FirebaseAuth/Tests/SampleSwift/AuthenticationExampleUITests/AuthenticationExampleUITests.swift

+6-2
Original file line numberDiff line numberDiff line change
@@ -229,12 +229,16 @@ class AuthenticationExampleUITests: XCTestCase {
229229
// MARK: - Private Helpers
230230

231231
private func signOut() {
232-
app.tabBars.firstMatch.buttons.element(boundBy: 1).tap()
232+
if app.tabBars.firstMatch.buttons.element(boundBy: 1).exists {
233+
app.tabBars.firstMatch.buttons.element(boundBy: 1).tap()
234+
}
233235
wait(forElement: app.navigationBars["User"], timeout: 5.0)
234236
if app.staticTexts["Sign Out"].exists {
235237
app.staticTexts["Sign Out"].tap()
236238
}
237-
app.tabBars.firstMatch.buttons.element(boundBy: 0).tap()
239+
if app.tabBars.firstMatch.buttons.element(boundBy: 0).exists {
240+
app.tabBars.firstMatch.buttons.element(boundBy: 0).tap()
241+
}
238242
}
239243
}
240244

scripts/build.sh

+2-15
Original file line numberDiff line numberDiff line change
@@ -300,26 +300,13 @@ case "$product-$platform-$method" in
300300
build
301301
;;
302302

303-
Auth-*-xcodebuild)
303+
Auth-*-*)
304304
if check_secrets; then
305305
RunXcodebuild \
306306
-project 'FirebaseAuth/Tests/SampleSwift/AuthenticationExample.xcodeproj' \
307-
-scheme "ObjCApiTests" \
307+
-scheme "$method" \
308308
"${xcb_flags[@]}" \
309309
test
310-
311-
RunXcodebuild \
312-
-project 'FirebaseAuth/Tests/SampleSwift/AuthenticationExample.xcodeproj' \
313-
-scheme "SwiftApiTests" \
314-
"${xcb_flags[@]}" \
315-
test
316-
317-
RunXcodebuild \
318-
-project 'FirebaseAuth/Tests/SampleSwift/AuthenticationExample.xcodeproj' \
319-
-scheme "AuthenticationExampleUITests" \
320-
"${xcb_flags[@]}" \
321-
build \
322-
test
323310
fi
324311
;;
325312

0 commit comments

Comments
 (0)