From 7131265a33436e139f8cf08904325b7099bf1613 Mon Sep 17 00:00:00 2001 From: Dirk Doesburg Date: Wed, 2 Nov 2022 11:33:28 +0100 Subject: [PATCH] Add iOS integration testing --- .github/workflows/integration-testing.yaml | 36 ++++++++++++++++++++-- 1 file changed, 33 insertions(+), 3 deletions(-) diff --git a/.github/workflows/integration-testing.yaml b/.github/workflows/integration-testing.yaml index a3a8b43ca..6089021da 100644 --- a/.github/workflows/integration-testing.yaml +++ b/.github/workflows/integration-testing.yaml @@ -5,9 +5,39 @@ on: - workflow_dispatch jobs: - integration-testing: - name: Testing + ios: + name: iOS integration testing runs-on: macos-latest + steps: + - name: "List all simulators" + run: "xcrun xctrace list devices" + + - name: "Start Simulator" + # the command "xcrun simctl boot" expects a device identifier + # the assignment of the UDID variable consists of retrieving the ID of the simulator + # by extracting it from the command "xcrun xctrace list devices" + run: | + UDID=$(xcrun xctrace list devices | grep "^iPhone 12 Pro Simulator (15.2) (" | awk '{gsub(/[()]/,""); print $NF}') + echo $UDID + xcrun simctl boot "${UDID:?No Simulator with this name found}" + + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Setup Flutter + uses: subosito/flutter-action@v2 + with: + flutter-version: 3.3.6 + channel: stable + cache: true + - name: Install Flutter dependencies + run: flutter pub get + - name: Run integration tests + run: flutter test integration_test --verbose + + andoid: + name: Android integration testing + runs-on: macos-11 steps: - name: Checkout repository uses: actions/checkout@v3 @@ -25,7 +55,7 @@ jobs: - name: Run integration tests uses: reactivecircus/android-emulator-runner@v2 with: - api-level: 31 + api-level: 33 arch: x86_64 profile: Nexus 6 script: flutter test -r expanded integration_test