2727
2828 runs-on : macos-14
2929
30+ # Please make sure the available Xcode versions and iOS versions
31+ # on the runner images. https://github.com/actions/runner-images
32+ env :
33+ XCODE_VERSION : 15.3
34+ IOS_VERSION : 17.4
35+ IPHONE_MODEL : iPhone 15 Plus
36+
3037 steps :
3138 - uses : actions/checkout@v3
3239
@@ -38,14 +45,14 @@ jobs:
3845 - name : Select Xcode
3946 uses : maxim-lobanov/setup-xcode@v1
4047 with :
41- xcode-version : 15.3
48+ xcode-version : ${{ env.XCODE_VERSION }}
4249 - run : defaults write com.apple.iphonesimulator PasteboardAutomaticSync -bool false
4350
4451 - uses : futureware-tech/simulator-action@v3
4552 with :
4653 # https://github.com/actions/runner-images/blob/main/images/macos/macos-14-arm64-Readme.md
47- model : ' iPhone 15 Plus '
48- os_version : ' 17.4 '
54+ model : ${{ env.IPHONE_MODEL }}
55+ os_version : ${{ env.IOS_VERSION }}
4956
5057 # needed?
5158 - run : brew install ffmpeg
@@ -77,3 +84,101 @@ jobs:
7784 with :
7885 name : appium-ios-${{matrix.test_targets.name}}.log
7986 path : appium.log
87+
88+
89+ android_test :
90+ strategy :
91+ fail-fast : false
92+ matrix :
93+ test_targets :
94+ - target : test/functional/android/device_time_tests.py test/functional/android/search_context/find_by_*.py
95+ name : func_test_android1
96+
97+ runs-on : ubuntu-latest
98+
99+ env :
100+ API_LEVEL : 29
101+ ARCH : x86
102+
103+ steps :
104+ - uses : actions/checkout@v3
105+
106+ - uses : actions/setup-java@v3
107+ with :
108+ distribution : ' temurin'
109+ java-version : ' 17'
110+
111+ - name : Install Node.js
112+ uses : actions/setup-node@v3
113+ with :
114+ node-version : ' lts/*'
115+
116+ # Start Appium
117+ - run : npm install -g appium
118+ - run : |
119+ appium driver install uiautomator2
120+ appium driver install espresso
121+ appium plugin install images
122+ appium plugin install execute-driver
123+ nohup appium --use-plugins=images,execute-driver --relaxed-security --log-timestamp --log-no-colors 2>&1 > appium.log &
124+
125+ - name : Enable KVM group perms
126+ run : |
127+ echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
128+ sudo udevadm control --reload-rules
129+ sudo udevadm trigger --name-match=kvm
130+
131+ - name : AVD cache
132+ uses : actions/cache@v3
133+ id : avd-cache
134+ with :
135+ path : |
136+ ~/.android/avd/*
137+ ~/.android/adb*
138+ key : avd-${{ env.API_LEVEL }}
139+ - name : create AVD and generate snapshot for caching
140+ if : steps.avd-cache.outputs.cache-hit != 'true'
141+ uses : reactivecircus/android-emulator-runner@v2
142+ with :
143+ api-level : ${{ env.API_LEVEL }}
144+ arch : ${{ env.ARCH }}
145+ target : google_apis
146+ force-avd-creation : false
147+ emulator-options : -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
148+ disable-animations : false
149+ script : echo "Generated AVD snapshot for caching."
150+
151+ - name : Set up Python 3.9
152+ uses : actions/setup-python@v3
153+ with :
154+ python-version : 3.9
155+
156+ - name : run tests
157+ uses : reactivecircus/android-emulator-runner@v2
158+ with :
159+ api-level : ${{ env.API_LEVEL }}
160+ arch : ${{ env.ARCH }}
161+ script : |
162+ # Separate 'run' creates differnet pipenv env. Does them in one run for now.
163+ pip install --upgrade pip
164+ pip install --upgrade pipenv
165+ pipenv lock --clear
166+ pipenv install -d --system
167+ pytest ${{ matrix.test_targets.target}} --doctest-modules --junitxml=junit/test-results.xml --cov=com --cov-report=xml --cov-report=html
168+ target : google_apis
169+ profile : Nexus 5X
170+ disable-spellchecker : true
171+ disable-animations : true
172+
173+ env :
174+ ANDROID_SDK_VERSION : ${{ env.API_LEVEL }}
175+ APPIUM_DRIVER : ${{matrix.test_targets.automation_name}}
176+ IGNORE_VERSION_SKIP : true
177+ CI : true
178+
179+ - name : Save server output
180+ if : ${{ always() }}
181+ uses : actions/upload-artifact@master
182+ with :
183+ name : appium-android-${{matrix.test_targets.name}}.log
184+ path : appium.log
0 commit comments