|
47 | 47 | - name: Test (app) |
48 | 48 | working-directory: mobile |
49 | 49 | run: flutter test |
| 50 | + |
| 51 | + test-mobile-ios: |
| 52 | + name: Flutter integration tests (iOS simulator) |
| 53 | + runs-on: macos-latest |
| 54 | + |
| 55 | + steps: |
| 56 | + - uses: actions/checkout@v4 |
| 57 | + |
| 58 | + - uses: flutter-actions/setup-flutter@v3 |
| 59 | + with: |
| 60 | + channel: stable |
| 61 | + |
| 62 | + - name: Install dependencies (plugin) |
| 63 | + working-directory: packages/ferrostar_flutter |
| 64 | + run: flutter pub get |
| 65 | + |
| 66 | + - name: Install dependencies (app) |
| 67 | + working-directory: mobile |
| 68 | + run: flutter pub get |
| 69 | + |
| 70 | + - name: Boot iPhone 17 simulator |
| 71 | + run: | |
| 72 | + UDID=$(xcrun simctl list devices available --json \ |
| 73 | + | python3 -c " |
| 74 | + import json,sys |
| 75 | + devs = json.load(sys.stdin)['devices'] |
| 76 | + for runtime, devices in devs.items(): |
| 77 | + for d in devices: |
| 78 | + if 'iPhone 17' in d['name'] and d['isAvailable']: |
| 79 | + print(d['udid']); exit() |
| 80 | + ") |
| 81 | + xcrun simctl boot "$UDID" |
| 82 | + echo "SIM_UDID=$UDID" >> "$GITHUB_ENV" |
| 83 | +
|
| 84 | + - name: Enable Flutter SPM integration |
| 85 | + working-directory: mobile |
| 86 | + run: flutter config --enable-swift-package-manager |
| 87 | + |
| 88 | + - name: Build (simulator, no codesign) |
| 89 | + working-directory: mobile |
| 90 | + run: flutter build ios --no-codesign --simulator |
| 91 | + |
| 92 | + - name: Run integration smoke test |
| 93 | + working-directory: mobile |
| 94 | + run: flutter test integration_test/navigation_smoke_test.dart -d "$SIM_UDID" |
0 commit comments