Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 17 additions & 3 deletions .github/workflows/sdk.ai.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,18 @@ jobs:
- os: macos-15
target: iOS
xcode: Xcode_26.2
action: build
- os: macos-26
target: iOS
# TODO: Bump to 26.4 when "Unable to find a destination matching the provided destination specifier" is resolved.
xcode: Xcode_26.2
action: test
runs-on: ${{ matrix.os }}
needs: spm
env:
TEST_RUNNER_FIRAAppCheckDebugToken: ${{ secrets.VERTEXAI_INTEGRATION_FAC_DEBUG_TOKEN }}
TEST_RUNNER_VTXIntegrationImagen: ${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }}
TEST_RUNNER_FALIntegrationImagen: ${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }}
TEST_RUNNER_FALIntegrationLiveSession: ${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }}
FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT: 1
secrets_passphrase: ${{ secrets.GHASecretsGPGPassphrase1 }}
steps:
Expand All @@ -60,8 +63,19 @@ jobs:
with:
path: .build
key: ${{ needs.spm.outputs.cache_key }}
- name: Run integration tests
run: scripts/repo.sh tests run --secrets ./scripts/secrets/AI.json --platforms ${{ matrix.target }} --xcode ${{ matrix.xcode }} AI
- name: Install Secret GoogleService-Info.plist
run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/FirebaseAI/TestApp-GoogleService-Info.plist.gpg \
FirebaseAI/Tests/TestApp/Resources/GoogleService-Info.plist "$secrets_passphrase"
- name: Install Secret GoogleService-Info-Spark.plist
run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/FirebaseAI/TestApp-GoogleService-Info-Spark.plist.gpg \
FirebaseAI/Tests/TestApp/Resources/GoogleService-Info-Spark.plist "$secrets_passphrase"
- name: Install Secret Credentials.swift
run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/FirebaseAI/TestApp-Credentials.swift.gpg \
FirebaseAI/Tests/TestApp/Tests/Integration/Credentials.swift "$secrets_passphrase"
- name: Xcode
run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer
- name: Run IntegrationTests
run: scripts/build.sh FirebaseAIIntegration ${{ matrix.target }} ${{ matrix.action }}
- name: Upload xcodebuild logs
if: failure()
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ import Testing

@Suite(
.enabled(
if: ProcessInfo.processInfo.environment["VTXIntegrationImagen"] != nil,
"Only runs if the environment variable VTXIntegrationImagen is set."
if: ProcessInfo.processInfo.environment["FALIntegrationImagen"] == "true",
"Only runs if the environment variable FALIntegrationImagen is set to true."
),
.serialized
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,13 @@ import Testing

@testable import struct FirebaseAILogic.APIConfig

@Suite(.serialized)
@Suite(
.enabled(
if: ProcessInfo.processInfo.environment["FALIntegrationLiveSession"] == "true",
"Only runs if the environment variable FALIntegrationLiveSession is set to true."
),
.serialized
)
struct LiveSessionTests {
private static let arguments = InstanceConfig.liveConfigs.flatMap { config in
switch config.apiConfig.service {
Expand Down
15 changes: 10 additions & 5 deletions scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,12 @@ function RunXcodebuild() {

local xcbeautify_cmd
if command -v xcbeautify &> /dev/null; then
xcbeautify_cmd=(xcbeautify --renderer github-actions --disable-logging)
xcbeautify_cmd=(
env NSUnbufferedIO=YES
xcbeautify
--renderer github-actions
--disable-logging
)
else
echo "xcbeautify not found, using raw xcodebuild output."
xcbeautify_cmd=(cat)
Expand Down Expand Up @@ -566,23 +571,23 @@ case "$product-$platform-$method" in
build
;;

FirebaseAIIntegration-*-*)
# Build
FirebaseAIIntegration-*-build)
RunXcodebuild \
-project 'FirebaseAI/Tests/TestApp/FirebaseAITestApp.xcodeproj' \
-scheme "FirebaseAITestApp-SPM" \
"${xcb_flags[@]}" \
build-for-testing
;;

# Run tests
FirebaseAIIntegration-*-test)
RunXcodebuild \
-project 'FirebaseAI/Tests/TestApp/FirebaseAITestApp.xcodeproj' \
-scheme "FirebaseAITestApp-SPM" \
"${xcb_flags[@]}" \
-parallel-testing-enabled NO \
-retry-tests-on-failure \
-test-iterations 3 \
test-without-building
test
;;

Sessions-*-integration)
Expand Down
Loading