Skip to content

Commit

Permalink
.github: add integration test on Android
Browse files Browse the repository at this point in the history
  • Loading branch information
wfleischer committed Dec 6, 2024
1 parent 54b7948 commit 7ac497d
Showing 1 changed file with 40 additions and 5 deletions.
45 changes: 40 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,28 +13,63 @@ jobs:

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}"
- uses: actions/checkout@v3
- uses: subosito/flutter-action@v2
with:
channel: stable
- run: flutter test integration_test --timeout 2x
- name: Run integration tests
run: flutter test integration_test --timeout 2x

0 comments on commit 7ac497d

Please sign in to comment.