feat(mobile): Flutter iOS app v0.1 #4
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Flutter Plugin | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - 'packages/ferrostar_flutter/**' | |
| - '.github/workflows/flutter-plugin.yml' | |
| pull_request: | |
| branches: [main] | |
| paths: | |
| - 'packages/ferrostar_flutter/**' | |
| - '.github/workflows/flutter-plugin.yml' | |
| jobs: | |
| test-flutter-plugin: | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: packages/ferrostar_flutter | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: flutter-actions/setup-flutter@v3 | |
| with: | |
| channel: stable | |
| - run: flutter pub get | |
| - run: flutter test | |
| test-flutter-plugin-ios: | |
| runs-on: macos-latest | |
| defaults: | |
| run: | |
| working-directory: packages/ferrostar_flutter/example | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: flutter-actions/setup-flutter@v3 | |
| with: | |
| channel: stable | |
| - name: Boot iPhone 17 simulator | |
| run: | | |
| UDID=$(xcrun simctl list devices available --json \ | |
| | python3 -c " | |
| import json,sys | |
| devs = json.load(sys.stdin)['devices'] | |
| for runtime, devices in devs.items(): | |
| for d in devices: | |
| if 'iPhone 17' in d['name'] and d['isAvailable']: | |
| print(d['udid']); exit() | |
| ") | |
| xcrun simctl boot "$UDID" | |
| echo "SIM_UDID=$UDID" >> "$GITHUB_ENV" | |
| - name: Enable Flutter SPM integration | |
| run: flutter config --enable-swift-package-manager | |
| - name: flutter build ios (simulator, no codesign) | |
| run: flutter build ios --no-codesign --simulator | |
| - name: Run integration tests | |
| run: flutter test integration_test/plugin_integration_test.dart -d "$SIM_UDID" |