Skip to content

.github: add integration test on Android #153

.github: add integration test on Android

.github: add integration test on Android #153

Workflow file for this run

name: Test CI
on:
pull_request:
branches:
- main
workflow_dispatch:
jobs:
checks:
name: Checks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
- run: ./check.sh
test-android:
name: Test Android
runs-on: ubuntu-latest
needs: checks
steps:
- uses: actions/checkout@v3
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
channel: stable
- name: Set up Android SDK
uses: android-actions/setup-android@v2
- name: Start Android emulator
run: |
sudo apt-get update
sudo apt-get install -y lib32stdc++6 qemu-kvm
sudo $ANDROID_HOME/emulator/emulator -avd test -no-window -no-audio -no-boot-anim -accel on &
sudo $ANDROID_HOME/platform-tools/adb wait-for-device
sudo $ANDROID_HOME/platform-tools/adb shell input keyevent 82
- name: Run integration tests
run: flutter test integration_test --timeout 2x
test-ios:
name: Test iOS
runs-on: macos-latest
needs: checks
steps:
- uses: actions/checkout@v3
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
channel: stable
- name: List all simulators
run: "xcrun xctrace list devices"
- name: Start simulator
run: |
UDID=$(xcrun xctrace list devices | grep "^iPhone 15 Simulator (18.1)" | awk '{gsub(/[()]/,""); print $NF}')
echo $UDID
xcrun simctl boot "${UDID:?No Simulator with this name found}"
- name: Run integration tests
run: flutter test integration_test --timeout 2x