@@ -58,16 +58,22 @@ jobs:
5858 appium plugin install execute-driver
5959 nohup appium --use-plugins=images,execute-driver --relaxed-security --log-timestamp --log-no-colors > appium.log &
6060
61+ - run : |
62+ npx appium driver run xcuitest download-wda-sim --platform=ios --outdir=${{ github.workspace }}/wda
63+ name: Downloading prebuilt WDA
64+
6165 - name : Set up Ruby
6266 uses : ruby/setup-ruby@v1
6367 with :
6468 ruby-version : 4.0
6569 - run : |
6670 bundle install
67- rake ios
71+ bundle exec rake ios
6872 name: Run tests
6973 timeout-minutes: 60
7074 working-directory: ios_tests
75+ env:
76+ LOCAL_PREBUILT_WDA: ${{ github.workspace }}/wda/WebDriverAgentRunner-Runner.app
7177
7278 - name : Save server output
7379 if : ${{ always() }}
7783 path : |
7884 appium.log
7985 test/report/
86+
87+ android_test :
88+ runs-on : ubuntu-latest
89+ timeout-minutes : 90
90+ env :
91+ API_LEVEL : 35
92+ ARCH : x86_64
93+
94+ steps :
95+ - uses : actions/checkout@v6
96+
97+ - name : Set up Java
98+ uses : actions/setup-java@v5
99+ with :
100+ distribution : temurin
101+ java-version : ' 17'
102+
103+ - name : Install Node.js
104+ uses : actions/setup-node@v6
105+ with :
106+ node-version : ' lts/*'
107+
108+ - name : Set up Ruby
109+ uses : ruby/setup-ruby@v1
110+ with :
111+ ruby-version : 4.0
112+
113+ - name : Install appium
114+ run : |
115+ npm install -g appium
116+ npm install -g mjpeg-consumer
117+
118+ - name : Start appium
119+ run : |
120+ appium driver install uiautomator2
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 > 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@v4
133+ id : avd-cache
134+ with :
135+ path : |
136+ ~/.android/avd/*
137+ ~/.android/adb*
138+ key : avd-${{ env.API_LEVEL }}
139+
140+ - name : Create AVD snapshot for cache
141+ if : steps.avd-cache.outputs.cache-hit != 'true'
142+ uses : reactivecircus/android-emulator-runner@v2
143+ with :
144+ api-level : ${{ env.API_LEVEL }}
145+ arch : ${{ env.ARCH }}
146+ target : google_apis
147+ force-avd-creation : false
148+ emulator-options : -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
149+ disable-animations : false
150+ script : echo "Generated AVD snapshot for caching."
151+
152+ - name : run tests
153+ uses : reactivecircus/android-emulator-runner@v2
154+ with :
155+ api-level : ${{ env.API_LEVEL }}
156+ arch : ${{ env.ARCH }}
157+ script : cd android_tests;bundle install;bundle exec rake --tasks;bundle exec rake android
158+ target : google_apis
159+ profile : Nexus 5X
160+ disable-spellchecker : true
161+ disable-animations : true
162+
163+ - name : Save server output
164+ if : ${{ always() }}
165+ uses : actions/upload-artifact@master
166+ with :
167+ name : appium-android_test_with_other_deps.log
168+ path : |
169+ appium.log
170+ test/report/
0 commit comments