Skip to content

Commit 37fa453

Browse files
committed
ci: record a video of emulator screen while running instrumented tests and store them in the artifacts folder
1 parent 4570987 commit 37fa453

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

.github/workflows/android.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,11 +91,21 @@ jobs:
9191
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
9292
sudo udevadm control --reload-rules
9393
sudo udevadm trigger --name-match=kvm
94-
- name: run tests
94+
- name: run tests with screen record
9595
uses: reactivecircus/android-emulator-runner@v2
9696
with:
9797
api-level: 29
98-
script: ./gradlew connectedCheck
98+
script: |
99+
adb shell screenrecord /sdcard/ui-test.mp4 &
100+
SCREENRECORD_PID=$!
101+
./gradlew connectedCheck || true
102+
kill $SCREENRECORD_PID || true
103+
adb pull /sdcard/ui-test.mp4 ./ui-test.mp4 || true
104+
- name: Upload UI test video
105+
uses: actions/upload-artifact@v4
106+
with:
107+
name: ui-test-video
108+
path: ./ui-test.mp4
99109

100110
notify-slack:
101111
needs: unit-test

0 commit comments

Comments
 (0)