@@ -194,3 +194,122 @@ jobs:
194194 with :
195195 name : appium-android-${{matrix.test_targets.name}}.log
196196 path : appium.log
197+
198+ flutter_e2e_test :
199+ # These flutter integration driver tests are maintained by: MummanaSubramanya
200+ strategy :
201+ fail-fast : false
202+ matrix :
203+ include :
204+ - platform : macos-14
205+ e2e-tests : flutter-ios
206+ - platform : ubuntu-latest
207+ e2e-tests : flutter-android
208+
209+ runs-on : ${{ matrix.platform }}
210+
211+ env :
212+ API_LEVEL : 28
213+ ARCH : x86
214+ CI : true
215+ XCODE_VERSION : 15.4
216+ IOS_VERSION : 17.5
217+ IPHONE_MODEL : iPhone 15
218+ FLUTTER_ANDROID_APP : " https://github.com/AppiumTestDistribution/appium-flutter-server/releases/latest/download/app-debug.apk"
219+ FLUTTER_IOS_APP : " https://github.com/AppiumTestDistribution/appium-flutter-server/releases/latest/download/ios.zip"
220+
221+ steps :
222+
223+ - uses : actions/checkout@v4
224+
225+ - uses : actions/setup-java@v4
226+ if : matrix.e2e-tests == 'flutter-android'
227+ with :
228+ distribution : ' zulu'
229+ java-version : ' 17'
230+
231+ - name : Enable KVM group perms
232+ if : matrix.e2e-tests == 'flutter-android'
233+ run : |
234+ echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
235+ sudo udevadm control --reload-rules
236+ sudo udevadm trigger --name-match=kvm
237+
238+ - name : Set up Python 3.12
239+ uses : actions/setup-python@v3
240+ with :
241+ python-version : 3.12
242+
243+ - name : Install Node.js
244+ uses : actions/setup-node@v4
245+ with :
246+ node-version : ' lts/*'
247+
248+ - name : Install Appium
249+ run : npm install --location=global appium
250+
251+ - name : Install Android drivers and Run Appium
252+ if : matrix.e2e-tests == 'flutter-android'
253+ run : |
254+ appium driver install uiautomator2
255+ appium driver install appium-flutter-integration-driver --source npm
256+ nohup appium --allow-insecure=adb_shell --relaxed-security --log-timestamp --log-no-colors 2>&1 > appium_flutter_android.log &
257+
258+ - name : Run Android tests
259+ if : matrix.e2e-tests == 'flutter-android'
260+ uses : reactivecircus/android-emulator-runner@v2
261+ with :
262+ api-level : ${{ env.API_LEVEL }}
263+ script : |
264+ pip install --upgrade pip
265+ pip install --upgrade pipenv
266+ pipenv lock --clear
267+ pipenv install -d --system
268+ export PLATFORM=android
269+ pytest test/functional/flutter_integration/*_test.py --doctest-modules --junitxml=junit/test-results.xml --cov=com --cov-report=xml --cov-report=html
270+ target : default
271+ disable-spellchecker : true
272+ disable-animations : true
273+
274+ - name : Save server output
275+ if : always() && matrix.e2e-tests == 'flutter-android'
276+ uses : actions/upload-artifact@master
277+ with :
278+ name : appium-flutter-android.log
279+ path : appium_flutter_android.log
280+
281+ - name : Select Xcode
282+ if : matrix.e2e-tests == 'flutter-ios'
283+ uses : maxim-lobanov/setup-xcode@v1
284+ with :
285+ xcode-version : ${{ env.XCODE_VERSION }}
286+
287+ - uses : futureware-tech/simulator-action@v3
288+ if : matrix.e2e-tests == 'flutter-ios'
289+ with :
290+ # https://github.com/actions/runner-images/blob/main/images/macos/macos-14-arm64-Readme.md
291+ model : ${{ env.IPHONE_MODEL }}
292+ os_version : ${{ env.IOS_VERSION }}
293+
294+ - name : install dependencies
295+ if : matrix.e2e-tests == 'flutter-ios'
296+ run : brew install ffmpeg
297+
298+ - name : Install IOS drivers and Run Appium
299+ if : matrix.e2e-tests == 'flutter-ios'
300+ run : |
301+ appium driver install xcuitest
302+ appium driver install appium-flutter-integration-driver --source npm
303+ appium driver run xcuitest build-wda
304+ nohup appium --allow-insecure=adb_shell --relaxed-security --log-timestamp --log-no-colors 2>&1 > appium_ios.log &
305+
306+ - name : Run IOS tests
307+ if : matrix.e2e-tests == 'flutter-ios'
308+ run : |
309+ # Separate 'run' creates differnet pipenv env. Does them in one run for now.
310+ pip install --upgrade pip
311+ pip install --upgrade pipenv
312+ pipenv lock --clear
313+ pipenv install -d --system
314+ export PLATFORM=ios
315+ pytest test/functional/flutter_integration/*_test.py --doctest-modules --junitxml=junit/test-results.xml --cov=com --cov-report=xml --cov-report=html
0 commit comments