Skip to content

Commit 34003e6

Browse files
committed
Add spm-testapp-integration job
1 parent 1e96338 commit 34003e6

File tree

4 files changed

+52
-4
lines changed

4 files changed

+52
-4
lines changed

.github/workflows/vertexai.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,36 @@ jobs:
125125
retry_wait_seconds: 120
126126
command: scripts/build.sh FirebaseVertexAIIntegration ${{ matrix.target }} spm
127127

128+
spm-testapp-integration:
129+
strategy:
130+
matrix:
131+
target: [iOS]
132+
os: [macos-15]
133+
include:
134+
- os: macos-15
135+
xcode: Xcode_16
136+
runs-on: ${{ matrix.os }}
137+
needs: spm-package-resolved
138+
env:
139+
TEST_RUNNER_VertexAIRunIntegrationTests: 1
140+
FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT: 1
141+
plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
142+
steps:
143+
- uses: actions/checkout@v4
144+
- uses: actions/cache/restore@v4
145+
with:
146+
path: .build
147+
key: ${{needs.spm-package-resolved.outputs.cache_key}}
148+
- name: Install Secret GoogleService-Info.plist
149+
run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/vertexai-integration.plist.gpg \
150+
FirebaseVertexAI/Tests/TestApp/Resources/GoogleService-Info.plist "$plist_secret"
151+
- name: Xcode
152+
run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer
153+
- name: Initialize xcodebuild
154+
run: scripts/setup_spm_tests.sh
155+
- name: Run IntegrationTests
156+
run: scripts/build.sh VertexIntegration ${{ matrix.target }}
157+
128158
pod-lib-lint:
129159
# Don't run on private repo unless it is a PR.
130160
if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
// Placeholder file to create folder.

FirebaseVertexAI/Tests/TestApp/VertexAITestApp.xcodeproj/project.pbxproj

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@
1212
866138602CC943DE00F4B78E /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 8661385F2CC943DE00F4B78E /* Assets.xcassets */; };
1313
866138642CC943DE00F4B78E /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 866138632CC943DE00F4B78E /* Preview Assets.xcassets */; };
1414
8661386E2CC943DE00F4B78E /* IntegrationTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8661386D2CC943DE00F4B78E /* IntegrationTests.swift */; };
15+
868A7C482CCA931B00E449DD /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 868A7C462CCA931B00E449DD /* GoogleService-Info.plist */; };
1516
8692F2982CC9477800539E8F /* FirebaseAppCheck in Frameworks */ = {isa = PBXBuildFile; productRef = 8692F2972CC9477800539E8F /* FirebaseAppCheck */; };
1617
8692F29A2CC9477800539E8F /* FirebaseAuth in Frameworks */ = {isa = PBXBuildFile; productRef = 8692F2992CC9477800539E8F /* FirebaseAuth */; };
1718
8692F29C2CC9477800539E8F /* FirebaseStorage in Frameworks */ = {isa = PBXBuildFile; productRef = 8692F29B2CC9477800539E8F /* FirebaseStorage */; };
1819
8692F29E2CC9477800539E8F /* FirebaseVertexAI in Frameworks */ = {isa = PBXBuildFile; productRef = 8692F29D2CC9477800539E8F /* FirebaseVertexAI */; };
19-
8692F2A02CC948C100539E8F /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 8692F29F2CC948C100539E8F /* GoogleService-Info.plist */; };
2020
/* End PBXBuildFile section */
2121

2222
/* Begin PBXContainerItemProxy section */
@@ -38,7 +38,7 @@
3838
866138632CC943DE00F4B78E /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = "<group>"; };
3939
866138692CC943DE00F4B78E /* IntegrationTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = IntegrationTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
4040
8661386D2CC943DE00F4B78E /* IntegrationTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IntegrationTests.swift; sourceTree = "<group>"; };
41-
8692F29F2CC948C100539E8F /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = "<group>"; };
41+
868A7C462CCA931B00E449DD /* GoogleService-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = "<group>"; };
4242
/* End PBXFileReference section */
4343

4444
/* Begin PBXFrameworksBuildPhase section */
@@ -67,6 +67,7 @@
6767
isa = PBXGroup;
6868
children = (
6969
8661385A2CC943DD00F4B78E /* VertexAITestApp */,
70+
868A7C472CCA931B00E449DD /* Resources */,
7071
8661386C2CC943DE00F4B78E /* IntegrationTests */,
7172
866138592CC943DD00F4B78E /* Products */,
7273
);
@@ -88,7 +89,6 @@
8889
8661385D2CC943DD00F4B78E /* ContentView.swift */,
8990
8661385F2CC943DE00F4B78E /* Assets.xcassets */,
9091
866138612CC943DE00F4B78E /* VertexAITestApp.entitlements */,
91-
8692F29F2CC948C100539E8F /* GoogleService-Info.plist */,
9292
866138622CC943DE00F4B78E /* Preview Content */,
9393
);
9494
path = VertexAITestApp;
@@ -110,6 +110,14 @@
110110
path = IntegrationTests;
111111
sourceTree = "<group>";
112112
};
113+
868A7C472CCA931B00E449DD /* Resources */ = {
114+
isa = PBXGroup;
115+
children = (
116+
868A7C462CCA931B00E449DD /* GoogleService-Info.plist */,
117+
);
118+
path = Resources;
119+
sourceTree = "<group>";
120+
};
113121
/* End PBXGroup section */
114122

115123
/* Begin PBXNativeTarget section */
@@ -202,7 +210,7 @@
202210
files = (
203211
866138642CC943DE00F4B78E /* Preview Assets.xcassets in Resources */,
204212
866138602CC943DE00F4B78E /* Assets.xcassets in Resources */,
205-
8692F2A02CC948C100539E8F /* GoogleService-Info.plist in Resources */,
213+
868A7C482CCA931B00E449DD /* GoogleService-Info.plist in Resources */,
206214
);
207215
runOnlyForDeploymentPostprocessing = 0;
208216
};

scripts/build.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -503,6 +503,15 @@ case "$product-$platform-$method" in
503503
build
504504
;;
505505

506+
VertexIntegration-*-*)
507+
RunXcodebuild \
508+
-project 'FirebaseVertexAI/Tests/TestApp/VertexAITestApp.xcodeproj' \
509+
-scheme "VertexAISample" \
510+
"${xcb_flags[@]}" \
511+
build \
512+
test
513+
;;
514+
506515
VertexSample-*-*)
507516
RunXcodebuild \
508517
-project 'FirebaseVertexAI/Sample/VertexAISample.xcodeproj' \

0 commit comments

Comments
 (0)