From 9f8d2c61ed7c0e5447a8c83943309bbfe035380e Mon Sep 17 00:00:00 2001 From: Pierre-Yves Ricau Date: Sat, 7 Sep 2024 06:51:00 -0700 Subject: [PATCH] add screen recording --- .github/workflows/android.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index aedd4e2..11ffc5e 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -87,7 +87,11 @@ jobs: chmod 777 emulator.log # allow writing to log file adb logcat >> emulator.log & # pipe all logcat messages into log file as a background process adb shell settings put global package_verifier_user_consent -1 + adb shell "screenrecord --bugreport /data/local/tmp/testRecording.mp4 & echo \$! > /data/local/tmp/screenrecord_pid.txt" & ./gradlew connectedCheck --no-build-cache --no-daemon --stacktrace + adb shell "kill -2 \$(cat /data/local/tmp/screenrecord_pid.txt)" + sleep 1 + adb pull /data/local/tmp/testRecording.mp4 . - name: Upload results if: ${{ always() }} uses: actions/upload-artifact@v3 @@ -95,6 +99,7 @@ jobs: name: ${{ matrix.api-level }}-${{ matrix.arch }}-instrumentation-test-results path: | emulator.log + testRecording.mp4 ./**/build/reports/androidTests/connected/** snapshot-deployment: