@@ -120,12 +120,12 @@ jobs:
120120 key : ${{ steps.derived-data-cache.outputs.cache-primary-key }}
121121
122122 - name : Upload test artifacts
123- if : failure()
124123 uses : actions/upload-artifact@v4
125124 with :
126125 name : e2e-ios-artifacts
127126 path : |
128- .maestro/screenshots/ios/*_diff.png
127+ .maestro/enrichedInput/screenshots/ios/*_diff.png
128+ .maestro/enrichedText/screenshots/ios/*_diff.png
129129
130130 e2e-android :
131131 needs : [changes]
@@ -151,14 +151,6 @@ jobs:
151151 distribution : ' zulu'
152152 java-version : ' 17'
153153
154- - name : Finalize Android SDK
155- run : |
156- /bin/bash -c "yes | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --licenses > /dev/null"
157- $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager "emulator" "platform-tools"
158- echo "$ANDROID_HOME/cmdline-tools/latest/bin" >> $GITHUB_PATH
159- echo "$ANDROID_HOME/platform-tools" >> $GITHUB_PATH
160- echo "$ANDROID_HOME/emulator" >> $GITHUB_PATH
161-
162154 - name : Install Maestro CLI
163155 run : |
164156 curl -Ls "https://get.maestro.mobile.dev" | bash
@@ -174,18 +166,52 @@ jobs:
174166 restore-keys : |
175167 ${{ runner.os }}-gradle-
176168
169+ - name : AVD cache
170+ uses : actions/cache@v4
171+ id : avd-cache
172+ with :
173+ path : |
174+ ~/.android/avd/*
175+ ~/.android/adb*
176+ key : avd-api-36-x86_64
177+
178+ - name : Create AVD and generate snapshot for caching
179+ if : steps.avd-cache.outputs.cache-hit != 'true'
180+ uses : reactivecircus/android-emulator-runner@v2
181+ with :
182+ api-level : 36
183+ target : google_apis_playstore
184+ arch : x86_64
185+ profile : pixel_7
186+ force-avd-creation : false
187+ emulator-options : -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim
188+ disable-animations : false
189+ enable-hw-keyboard : true
190+ script : echo "Generated AVD snapshot for caching."
191+
177192 - name : Start Metro
178193 run : yarn example start &
179194
180195 - name : Run E2E tests
181- run : yarn test:e2e:android
196+ uses : reactivecircus/android-emulator-runner@v2
197+ with :
198+ api-level : 36
199+ target : google_apis_playstore
200+ arch : x86_64
201+ profile : pixel_7
202+ force-avd-creation : false
203+ emulator-options : -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim
204+ disable-animations : true
205+ disable-spellchecker : true
206+ enable-hw-keyboard : true
207+ script : EMULATOR_SERIAL=emulator-5554 .maestro/scripts/run-tests-ci-android.sh
182208 env :
183209 JAVA_OPTS : ' -XX:MaxHeapSize=6g'
184210
185211 - name : Upload test artifacts
186- if : failure()
187212 uses : actions/upload-artifact@v4
188213 with :
189214 name : e2e-android-artifacts
190215 path : |
191- .maestro/screenshots/android/*_diff.png
216+ .maestro/enrichedInput/screenshots/android/*_diff.png
217+ .maestro/enrichedText/screenshots/android/*_diff.png
0 commit comments