Skip to content

Commit 9876601

Browse files
[Sessions] Add Test App and Integration tests for the Sessions SDK (#10396)
1 parent a1b78b2 commit 9876601

File tree

17 files changed

+1405
-0
lines changed

17 files changed

+1405
-0
lines changed
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Merge the yml file to master branch for the cron job schedule to be effective.
2+
# Reference: https://github.community/t/on-schedule-per-branch/17525
3+
name: sessions-integration-tests
4+
5+
on:
6+
pull_request:
7+
paths:
8+
# This configuration file.
9+
- '.github/workflows/sessions-integration-tests.yml'
10+
# See cron syntax references:
11+
# - https://docs.github.com/en/actions/reference/events-that-trigger-workflows#scheduled-events-schedule
12+
# - https://crontab.guru/
13+
schedule:
14+
# Runs every 4 hours.
15+
- cron: '0 */4 * * *'
16+
17+
concurrency:
18+
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
19+
cancel-in-progress: true
20+
21+
jobs:
22+
23+
# Public repository: Build and run the Integration Tests for the Firebase sessions E2E Test App.
24+
sessions-integration-tests:
25+
if: github.repository == 'Firebase/firebase-ios-sdk'
26+
env:
27+
plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
28+
runs-on: macos-12
29+
steps:
30+
- uses: actions/checkout@v3
31+
- uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126
32+
with:
33+
cache_key: ${{ matrix.os }}
34+
- uses: ruby/setup-ruby@v1
35+
- name: Setup Bundler
36+
run: scripts/setup_bundler.sh
37+
- name: Install xcpretty
38+
run: gem install xcpretty
39+
- name: Install Secret GoogleService-Info.plist
40+
run: |
41+
scripts/decrypt_gha_secret.sh scripts/gha-encrypted/Sessions/GoogleService-Info_TestApp.plist.gpg \
42+
FirebaseSessions/Tests/TestApp/Shared/GoogleService-Info.plist "$plist_secret"
43+
- name: BuildAndTest # can be replaced with pod lib lint with CocoaPods 1.10
44+
run: scripts/third_party/travis/retry.sh scripts/build.sh Sessions all integration
45+

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ FirebaseDatabase/Tests/Resources/GoogleService-Info.plist
1111
FirebaseRemoteConfig/Tests/Sample/GoogleService-Info.plist
1212
FirebaseRemoteConfigSwift/Apps/SwiftUISample/SwiftUISample/GoogleService-Info.plist
1313

14+
# Firebase Sessions test app and integration tests GoogleService-Info.plist
15+
FirebaseSessions/**/GoogleService-Info.plist
16+
1417
# FirebaseStorage integration tests GoogleService-Info.plist
1518
FirebaseStorage/Tests/Integration/Resources/GoogleService-Info.plist
1619

FirebaseSessions/Tests/TestApp/AppQualityDevApp.xcodeproj/project.pbxproj

Lines changed: 747 additions & 0 deletions
Large diffs are not rendered by default.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Scheme
3+
LastUpgradeVersion = "1340"
4+
version = "1.3">
5+
<BuildAction
6+
parallelizeBuildables = "YES"
7+
buildImplicitDependencies = "YES">
8+
<BuildActionEntries>
9+
<BuildActionEntry
10+
buildForTesting = "YES"
11+
buildForRunning = "YES"
12+
buildForProfiling = "YES"
13+
buildForArchiving = "YES"
14+
buildForAnalyzing = "YES">
15+
<BuildableReference
16+
BuildableIdentifier = "primary"
17+
BlueprintIdentifier = "DF33DA6A28E4941400F7B88B"
18+
BuildableName = "AppQualityDevApp_iOS.app"
19+
BlueprintName = "AppQualityDevApp_iOS"
20+
ReferencedContainer = "container:AppQualityDevApp.xcodeproj">
21+
</BuildableReference>
22+
</BuildActionEntry>
23+
</BuildActionEntries>
24+
</BuildAction>
25+
<TestAction
26+
buildConfiguration = "Debug"
27+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
28+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
29+
shouldUseLaunchSchemeArgsEnv = "YES">
30+
<Testables>
31+
<TestableReference
32+
skipped = "NO">
33+
<BuildableReference
34+
BuildableIdentifier = "primary"
35+
BlueprintIdentifier = "DF33DA7728E4941400F7B88B"
36+
BuildableName = "Tests iOS.xctest"
37+
BlueprintName = "Tests iOS"
38+
ReferencedContainer = "container:AppQualityDevApp.xcodeproj">
39+
</BuildableReference>
40+
</TestableReference>
41+
<TestableReference
42+
skipped = "NO"
43+
parallelizable = "YES">
44+
<BuildableReference
45+
BuildableIdentifier = "primary"
46+
BlueprintIdentifier = "CF94D83929070DF600308FF7"
47+
BuildableName = "UITests_iOS.xctest"
48+
BlueprintName = "UITests_iOS"
49+
ReferencedContainer = "container:AppQualityDevApp.xcodeproj">
50+
</BuildableReference>
51+
</TestableReference>
52+
</Testables>
53+
</TestAction>
54+
<LaunchAction
55+
buildConfiguration = "Debug"
56+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
57+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
58+
launchStyle = "0"
59+
useCustomWorkingDirectory = "NO"
60+
ignoresPersistentStateOnLaunch = "NO"
61+
debugDocumentVersioning = "YES"
62+
debugServiceExtension = "internal"
63+
allowLocationSimulation = "YES">
64+
<BuildableProductRunnable
65+
runnableDebuggingMode = "0">
66+
<BuildableReference
67+
BuildableIdentifier = "primary"
68+
BlueprintIdentifier = "DF33DA6A28E4941400F7B88B"
69+
BuildableName = "AppQualityDevApp_iOS.app"
70+
BlueprintName = "AppQualityDevApp_iOS"
71+
ReferencedContainer = "container:AppQualityDevApp.xcodeproj">
72+
</BuildableReference>
73+
</BuildableProductRunnable>
74+
<CommandLineArguments>
75+
<CommandLineArgument
76+
argument = "-FIRDebugEnabled"
77+
isEnabled = "YES">
78+
</CommandLineArgument>
79+
</CommandLineArguments>
80+
</LaunchAction>
81+
<ProfileAction
82+
buildConfiguration = "Release"
83+
shouldUseLaunchSchemeArgsEnv = "YES"
84+
savedToolIdentifier = ""
85+
useCustomWorkingDirectory = "NO"
86+
debugDocumentVersioning = "YES">
87+
<BuildableProductRunnable
88+
runnableDebuggingMode = "0">
89+
<BuildableReference
90+
BuildableIdentifier = "primary"
91+
BlueprintIdentifier = "DF33DA6A28E4941400F7B88B"
92+
BuildableName = "AppQualityDevApp_iOS.app"
93+
BlueprintName = "AppQualityDevApp_iOS"
94+
ReferencedContainer = "container:AppQualityDevApp.xcodeproj">
95+
</BuildableReference>
96+
</BuildableProductRunnable>
97+
</ProfileAction>
98+
<AnalyzeAction
99+
buildConfiguration = "Debug">
100+
</AnalyzeAction>
101+
<ArchiveAction
102+
buildConfiguration = "Release"
103+
revealArchiveInOrganizer = "YES">
104+
</ArchiveAction>
105+
</Scheme>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Scheme
3+
LastUpgradeVersion = "1400"
4+
version = "1.3">
5+
<BuildAction
6+
parallelizeBuildables = "YES"
7+
buildImplicitDependencies = "YES">
8+
<BuildActionEntries>
9+
<BuildActionEntry
10+
buildForTesting = "YES"
11+
buildForRunning = "YES"
12+
buildForProfiling = "YES"
13+
buildForArchiving = "YES"
14+
buildForAnalyzing = "YES">
15+
<BuildableReference
16+
BuildableIdentifier = "primary"
17+
BlueprintIdentifier = "DF33DA7028E4941400F7B88B"
18+
BuildableName = "AppQualityDevApp_macOS.app"
19+
BlueprintName = "AppQualityDevApp_macOS"
20+
ReferencedContainer = "container:AppQualityDevApp.xcodeproj">
21+
</BuildableReference>
22+
</BuildActionEntry>
23+
</BuildActionEntries>
24+
</BuildAction>
25+
<TestAction
26+
buildConfiguration = "Debug"
27+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
28+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
29+
shouldUseLaunchSchemeArgsEnv = "YES">
30+
<Testables>
31+
<TestableReference
32+
skipped = "NO">
33+
<BuildableReference
34+
BuildableIdentifier = "primary"
35+
BlueprintIdentifier = "DF33DA8328E4941400F7B88B"
36+
BuildableName = "Tests macOS.xctest"
37+
BlueprintName = "Tests macOS"
38+
ReferencedContainer = "container:AppQualityDevApp.xcodeproj">
39+
</BuildableReference>
40+
</TestableReference>
41+
</Testables>
42+
</TestAction>
43+
<LaunchAction
44+
buildConfiguration = "Debug"
45+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
46+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
47+
launchStyle = "0"
48+
useCustomWorkingDirectory = "NO"
49+
ignoresPersistentStateOnLaunch = "NO"
50+
debugDocumentVersioning = "YES"
51+
debugServiceExtension = "internal"
52+
allowLocationSimulation = "YES">
53+
<BuildableProductRunnable
54+
runnableDebuggingMode = "0">
55+
<BuildableReference
56+
BuildableIdentifier = "primary"
57+
BlueprintIdentifier = "DF33DA7028E4941400F7B88B"
58+
BuildableName = "AppQualityDevApp_macOS.app"
59+
BlueprintName = "AppQualityDevApp_macOS"
60+
ReferencedContainer = "container:AppQualityDevApp.xcodeproj">
61+
</BuildableReference>
62+
</BuildableProductRunnable>
63+
</LaunchAction>
64+
<ProfileAction
65+
buildConfiguration = "Release"
66+
shouldUseLaunchSchemeArgsEnv = "YES"
67+
savedToolIdentifier = ""
68+
useCustomWorkingDirectory = "NO"
69+
debugDocumentVersioning = "YES">
70+
<BuildableProductRunnable
71+
runnableDebuggingMode = "0">
72+
<BuildableReference
73+
BuildableIdentifier = "primary"
74+
BlueprintIdentifier = "DF33DA7028E4941400F7B88B"
75+
BuildableName = "AppQualityDevApp_macOS.app"
76+
BlueprintName = "AppQualityDevApp_macOS"
77+
ReferencedContainer = "container:AppQualityDevApp.xcodeproj">
78+
</BuildableReference>
79+
</BuildableProductRunnable>
80+
</ProfileAction>
81+
<AnalyzeAction
82+
buildConfiguration = "Debug">
83+
</AnalyzeAction>
84+
<ArchiveAction
85+
buildConfiguration = "Release"
86+
revealArchiveInOrganizer = "YES">
87+
</ArchiveAction>
88+
</Scheme>
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Scheme
3+
LastUpgradeVersion = "1400"
4+
version = "1.3">
5+
<BuildAction
6+
parallelizeBuildables = "YES"
7+
buildImplicitDependencies = "YES">
8+
</BuildAction>
9+
<TestAction
10+
buildConfiguration = "Debug"
11+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
12+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
13+
shouldUseLaunchSchemeArgsEnv = "YES">
14+
<Testables>
15+
<TestableReference
16+
skipped = "NO"
17+
parallelizable = "YES">
18+
<BuildableReference
19+
BuildableIdentifier = "primary"
20+
BlueprintIdentifier = "CF94D83929070DF600308FF7"
21+
BuildableName = "UITests_iOS.xctest"
22+
BlueprintName = "UITests_iOS"
23+
ReferencedContainer = "container:AppQualityDevApp.xcodeproj">
24+
</BuildableReference>
25+
</TestableReference>
26+
</Testables>
27+
</TestAction>
28+
<LaunchAction
29+
buildConfiguration = "Debug"
30+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
31+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
32+
launchStyle = "0"
33+
useCustomWorkingDirectory = "NO"
34+
ignoresPersistentStateOnLaunch = "NO"
35+
debugDocumentVersioning = "YES"
36+
debugServiceExtension = "internal"
37+
allowLocationSimulation = "YES">
38+
</LaunchAction>
39+
<ProfileAction
40+
buildConfiguration = "Release"
41+
shouldUseLaunchSchemeArgsEnv = "YES"
42+
savedToolIdentifier = ""
43+
useCustomWorkingDirectory = "NO"
44+
debugDocumentVersioning = "YES">
45+
</ProfileAction>
46+
<AnalyzeAction
47+
buildConfiguration = "Debug">
48+
</AnalyzeAction>
49+
<ArchiveAction
50+
buildConfiguration = "Release"
51+
revealArchiveInOrganizer = "YES">
52+
</ArchiveAction>
53+
</Scheme>
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Uncomment the next line to define a global platform for your project
2+
# platform :ios, '9.0'
3+
4+
def shared_pods
5+
pod 'FirebaseCore', :path => '../../../'
6+
pod 'FirebaseInstallations', :path => '../../../'
7+
pod 'FirebaseCoreInternal', :path => '../../../'
8+
pod 'FirebaseCoreExtension', :path => '../../../'
9+
pod 'FirebaseSessions', :path => '../../../'
10+
end
11+
12+
target 'AppQualityDevApp_iOS' do
13+
platform :ios, '11.0'
14+
15+
# Comment the next line if you don't want to use dynamic frameworks
16+
use_frameworks!
17+
18+
shared_pods
19+
end
20+
21+
target 'AppQualityDevApp_macOS' do
22+
platform :macos, '10.13'
23+
24+
# Comment the next line if you don't want to use dynamic frameworks
25+
use_frameworks!
26+
27+
shared_pods
28+
end
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
//
2+
// Copyright 2022 Google LLC
3+
//
4+
// Licensed under the Apache License, Version 2.0 (the "License");
5+
// you may not use this file except in compliance with the License.
6+
// You may obtain a copy of the License at
7+
//
8+
// http://www.apache.org/licenses/LICENSE-2.0
9+
//
10+
// Unless required by applicable law or agreed to in writing, software
11+
// distributed under the License is distributed on an "AS IS" BASIS,
12+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
// See the License for the specific language governing permissions and
14+
// limitations under the License.
15+
16+
import SwiftUI
17+
import FirebaseCore
18+
19+
@main
20+
struct AppQualityDevAppApp: App {
21+
init() {
22+
FirebaseApp.configure()
23+
}
24+
25+
var body: some Scene {
26+
WindowGroup {
27+
ContentView()
28+
}
29+
}
30+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"colors" : [
3+
{
4+
"idiom" : "universal"
5+
}
6+
],
7+
"info" : {
8+
"author" : "xcode",
9+
"version" : 1
10+
}
11+
}

0 commit comments

Comments
 (0)