Skip to content

Commit dca616a

Browse files
committed
ci(mobile): add job to build and test ios mobile app
1 parent 33d19ca commit dca616a

File tree

1 file changed

+42
-1
lines changed

1 file changed

+42
-1
lines changed

.github/workflows/ci.yaml

Lines changed: 42 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,9 @@ jobs:
1515
steps:
1616
- uses: actions/checkout@v4
1717

18-
- name: Setup Gradle build cache
18+
- name: Restore Gradle build cache
1919
uses: gradle/actions/setup-gradle@v3
20+
2021
- name: Setup Flutter
2122
uses: subosito/flutter-action@v2
2223
with:
@@ -58,6 +59,7 @@ jobs:
5859
disable-animations: false
5960
script: echo "Generated AVD snapshot for caching."
6061

62+
# run tests on android AVD
6163
- name: Write test_auth_info.dart secrets
6264
run: printf "${{ secrets.TEST_AUTH_INFO_B64 }}" | base64 -d > test_auth_info.dart
6365

@@ -70,6 +72,45 @@ jobs:
7072
disable-animations: true
7173
script: flutter drive --driver=test_driver/integration_driver.dart --target=integration_test/main.dart
7274

75+
mobile-ios:
76+
name: Build & Test Mobile App (iOS)
77+
runs-on: ubuntu-22.04
78+
steps:
79+
- name: Setup Flutter
80+
uses: subosito/flutter-action@v2
81+
with:
82+
channel: stable
83+
flutter-version-file: pubspec.yaml
84+
85+
- name: Restore Xcode build cache
86+
uses: irgaly/xcode-cache@v1
87+
with:
88+
key: xcode-cache-deriveddata-${{ github.workflow }}-${{ github.sha }}
89+
restore-keys: xcode-cache-deriveddata-${{ github.workflow }}-
90+
91+
- name: Build iOS IPA
92+
run: flutter build ipa
93+
94+
- name: Upload iOS IPA
95+
uses: actions/upload-artifact@v4
96+
with:
97+
name: flowmotion-debug.ipa
98+
path: build/ios/ipa/Runner.ipa
99+
100+
- name: Boot iOS simulator
101+
uses: futureware-tech/simulator-action@v3
102+
with:
103+
model: "iPhone 15"
104+
os: "iOS"
105+
os_version: "17.4"
106+
107+
# run tests on ios simulator
108+
- name: Write test_auth_info.dart secrets
109+
run: printf "${{ secrets.TEST_AUTH_INFO_B64 }}" | base64 -d > test_auth_info.dart
110+
111+
- name: Test Mobile App (iOS)
112+
run: flutter drive --driver=test_driver/integration_driver.dart --target=integration_test/main.dart
113+
73114
pipeline:
74115
strategy:
75116
fail-fast: false

0 commit comments

Comments
 (0)