@@ -123,8 +123,11 @@ jobs:
123123 fi
124124 adb shell input keyevent 82
125125 adb shell settings put global window_animation_scale 0.0
126- adb shell settings put global transition_animation_scale 0.0
127126 adb shell settings put global animator_duration_scale 0.0
127+ # transition_animation_scale is left alone on purpose: Reanimated
128+ # reports reduced motion when it is 0, which finishes every withTiming
129+ # in a single frame.
130+ adb shell settings put system show_touches 1
128131 SERIAL=$(adb devices | awk 'NR>1 && $2=="device"{print $1; exit}')
129132 echo "Emulator ready: $SERIAL"
130133 echo "ANDROID_SERIAL=$SERIAL" >> "$GITHUB_ENV"
@@ -146,16 +149,55 @@ jobs:
146149 # Logs how the backend discovers the emulator; drop once this is green.
147150 simulator-server-log : debug
148151
152+ # `screenrecord` stops on its own after 3 minutes, so record in segments
153+ # until the stop step interrupts it.
154+ - name : Start screen recording
155+ run : |
156+ adb shell 'rm -f /sdcard/rec-*.mp4'
157+ nohup bash -c '
158+ i=0
159+ while adb shell screenrecord --bit-rate 2000000 --time-limit 180 \
160+ "/sdcard/rec-$(printf %03d "$i").mp4"; do
161+ i=$((i + 1))
162+ done
163+ ' > screenrecord.log 2>&1 &
164+ echo "SCREENRECORD_PID=$!" >> "$GITHUB_ENV"
165+
149166 - name : Run E2E tests
150167 run : argent flow run ./.argent/flows --device "$ANDROID_SERIAL"
151168
152- - name : Print emulator log
153- if : ${{ !success() }}
154- run : cat emulator.log 2>/dev/null || echo "no emulator.log"
169+ - name : Stop screen recording
170+ if : ${{ always() }}
171+ run : |
172+ kill "${SCREENRECORD_PID:-}" 2>/dev/null || true
173+ # SIGINT is what makes screenrecord write the mp4 trailer; killed any
174+ # other way, the last segment is unplayable.
175+ adb shell pkill -INT screenrecord || true
176+ for _ in $(seq 1 15); do
177+ adb shell pgrep screenrecord > /dev/null 2>&1 || break
178+ sleep 1
179+ done
180+ mkdir -p "$RUNNER_TEMP/e2e-debug/recordings"
181+ for f in $(adb shell 'ls /sdcard/rec-*.mp4' 2>/dev/null | tr -d '\r'); do
182+ adb pull "$f" "$RUNNER_TEMP/e2e-debug/recordings" || true
183+ done
155184
156185 # The tool-server log also carries the device backend's stderr
157186 # (`[sim <serial>]` lines), where a failed connection to the emulator is
158187 # explained.
159- - name : Print Argent tool-server log
188+ - name : Collect logs
189+ if : ${{ always() }}
190+ run : |
191+ mkdir -p "$RUNNER_TEMP/e2e-debug/logs"
192+ for f in emulator.log screenrecord.log "${ARGENT_SERVER_LOG:-}"; do
193+ cp "$f" "$RUNNER_TEMP/e2e-debug/logs" 2>/dev/null || true
194+ done
195+ ls -lR "$RUNNER_TEMP/e2e-debug"
196+
197+ - name : Upload logs and screen recording
160198 if : ${{ !success() }}
161- run : cat "$ARGENT_SERVER_LOG" 2>/dev/null || echo "no Argent tool-server log"
199+ uses : actions/upload-artifact@v4
200+ with :
201+ name : e2e-android-debug-${{ inputs.artifact-name }}
202+ path : ${{ runner.temp }}/e2e-debug/
203+ if-no-files-found : ignore
0 commit comments