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