Skip to content

add iOS unit tests to CI #1

add iOS unit tests to CI

add iOS unit tests to CI #1

Workflow file for this run

name: iOS
on:
pull_request:
paths:
- "mock-responses**"
- ".github/workflows/ios.yml"
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true
jobs:
spm-unit:
strategy:
matrix:
target: [iOS, macOS, catalyst, tvOS, visionOS]
os: [macos-14]
include:
- os: macos-14
xcode: Xcode_15.2
runs-on: ${{ matrix.os }}
env:
FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT: 1
steps:
- uses: actions/checkout@v4
- name: Clone iOS SDK repo
run: git clone --depth 1 https://github.com/firebase/firebase-ios-sdk.git
- name: Copy mock responses into SDK repo
run:
rm -rf firebase-ios-sdk/FirebaseVertexAI/Tests/Unit/vertexai-sdk-test-data &&
mkdir firebase-ios-sdk/FirebaseVertexAI/Tests/Unit/vertexai-sdk-test-data &&
cp -r mock-responses firebase-ios-sdk/FirebaseVertexAI/Tests/Unit/vertexai-sdk-test-data
- name: Xcode
run: cd firebase-ios-sdk &&
sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer
- name: Initialize xcodebuild
run: cd firebase-ios-sdk &&
scripts/setup_spm_tests.sh
- uses: nick-fields/retry@v3
with:
timeout_minutes: 120
max_attempts: 3
retry_on: error
retry_wait_seconds: 120
command: cd firebase-ios-sdk &&
scripts/build.sh FirebaseVertexAIUnit ${{ matrix.target }} spm