ci: Move iOS Integration Tests to Codemagic #408
Workflow file for this run
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: Build | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - main | |
| - dev | |
| pull_request: | |
| branches: | |
| - main | |
| - dev | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| quality: | |
| name: Quality Checks | |
| runs-on: macos-15 | |
| defaults: | |
| run: | |
| working-directory: packages/home_widget | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - uses: subosito/flutter-action@v1 | |
| with: | |
| channel: stable | |
| - uses: bluefireteam/melos-action@v3 | |
| - name: Analyze | |
| run: melos analyze | |
| - name: Install Formatters | |
| run: brew install swift-format ktfmt | |
| - name: Format | |
| run: melos format:all | |
| - name: Publishability | |
| run: flutter pub publish --dry-run | |
| - name: Test | |
| run: flutter test --coverage | |
| - name: Archieve Golden Failures | |
| if: failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: Golden failures | |
| retention-days: 2 | |
| path: | | |
| **/test/**/failures/**/*.* | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v1 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| path: ./packages/home_widget/coverage/lcov.info | |
| android: | |
| name: Android Integration Tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - uses: subosito/flutter-action@v1 | |
| with: | |
| channel: stable | |
| - uses: bluefireteam/melos-action@v3 | |
| - name: Enable KVM | |
| run: | | |
| echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules | |
| sudo udevadm control --reload-rules | |
| sudo udevadm trigger --name-match=kvm | |
| - name: Set up JDK 21 | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'temurin' | |
| java-version: '21' | |
| - name: Run Android Integration Tests | |
| uses: reactivecircus/android-emulator-runner@v2 | |
| with: | |
| api-level: 33 | |
| arch: x86_64 | |
| profile: Nexus 6 | |
| sdcard-path-or-size: 100M | |
| emulator-boot-timeout: 900 | |
| emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none | |
| script: flutter test integration_test/android_test.dart -d emulator-5554 | |
| working-directory: packages/home_widget/example | |
| # iOS Test based on https://medium.com/flutter-community/run-flutter-driver-tests-on-github-actions-13c639c7e4ab | |
| # by @kate_sheremet | |
| ios: | |
| name: iOS Integration Tests | |
| strategy: | |
| matrix: | |
| device: | |
| - "iPhone 16 Pro" | |
| xcode-version: | |
| - "16.4" | |
| fail-fast: false | |
| runs-on: macos-15 | |
| timeout-minutes: 30 | |
| defaults: | |
| run: | |
| working-directory: packages/home_widget/example | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - uses: maxim-lobanov/setup-xcode@v1 | |
| with: | |
| xcode-version: ${{ matrix.xcode-version }} | |
| - uses: subosito/flutter-action@v1 | |
| with: | |
| channel: stable | |
| - uses: bluefireteam/melos-action@v3 | |
| - uses: futureware-tech/simulator-action@v4 | |
| id: simulator | |
| with: | |
| model: ${{ matrix.device }} | |
| wait_for_boot: true | |
| - name: "Run iOS integration tests" | |
| run: flutter test integration_test/ios_test.dart -d ${{steps.simulator.outputs.udid}} --ignore-timeouts -v |