Skip to content

private-repo-ios-ci #4548

private-repo-ios-ci

private-repo-ios-ci #4548

Workflow file for this run

name: iOS-CI
on:
pull_request:
branches: [main]
repository_dispatch:
types: [private-repo-ios-ci]
workflow_dispatch:
inputs:
pr_number:
description: "PR number from private repo"
required: false
type: string
pr_ref:
description: "Git ref to checkout from private repo"
required: false
type: string
default: "main"
env:
FLUTTER_VERSION: "3.27.4"
RUST_TOOLCHAIN: "1.92.0"
concurrency:
group: ${{ github.workflow }}-${{ github.event.client_payload.pr_number || github.event.inputs.pr_number || github.ref }}
cancel-in-progress: true
jobs:
integration-tests:
timeout-minutes: 120
runs-on: macos-latest
steps:
- name: Checkout private repository
uses: actions/checkout@v4
with:
repository: AppFlowy-IO/AppFlowy-Premium
token: ${{ secrets.ADMIN_GITHUB_TOKEN }}
ref: ${{ github.event.client_payload.pr_ref || github.event.inputs.pr_ref || 'main' }}
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ env.RUST_TOOLCHAIN }}
target: aarch64-apple-ios-sim
override: true
profile: minimal
- name: Install Flutter
uses: subosito/flutter-action@v2
with:
channel: "stable"
flutter-version: ${{ env.FLUTTER_VERSION }}
cache: true
- uses: Swatinem/rust-cache@v2
with:
prefix-key: ${{ matrix.os }}
workspaces: |
frontend/rust-lib
cache-all-crates: true
- uses: davidB/rust-cargo-make@v1
with:
version: "0.37.15"
- name: Install prerequisites
working-directory: frontend
run: |
rustup target install aarch64-apple-ios-sim
cargo install --force --locked duckscript_cli
cargo install cargo-lipo
cargo make appflowy-flutter-deps-tools
shell: bash
- name: Configure Git credentials for Cargo
run: |
git config --global credential.helper store
echo "https://${{ secrets.ADMIN_GITHUB_TOKEN }}:x-oauth-basic@github.com" > ~/.git-credentials
- name: Build AppFlowy
working-directory: frontend
run: |
cargo make --profile development-ios-arm64-sim appflowy-core-dev-ios
cargo make --profile development-ios-arm64-sim code_generation
- name: List simulators
run: |
xcrun simctl list --json devices available
- uses: futureware-tech/simulator-action@v4
id: simulator-action
with:
model: "iPhone 16 Pro"
shutdown_after_job: false
# Integration tests
- name: Pre-build iOS app for simulator
working-directory: frontend/appflowy_flutter
run: flutter build ios --simulator --debug
- name: Run Flutter unit tests
uses: nick-fields/retry@v3
with:
timeout_minutes: 60
max_attempts: 3
retry_wait_seconds: 10
command: |
cd frontend/appflowy_flutter
flutter test integration_test/runner.dart -d ${{ steps.simulator-action.outputs.udid }}