Skip to content

Commit

Permalink
Add iOS integration testing
Browse files Browse the repository at this point in the history
  • Loading branch information
DeD1rk committed Nov 2, 2022
1 parent d68ae45 commit 7131265
Showing 1 changed file with 33 additions and 3 deletions.
36 changes: 33 additions & 3 deletions .github/workflows/integration-testing.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

0 comments on commit 7131265

Please sign in to comment.