From cc1295d21436fb841b04b5170a3c1b88b4081417 Mon Sep 17 00:00:00 2001 From: Dorian Mazur <46839236+DorianMazur@users.noreply.github.com> Date: Thu, 21 Nov 2024 10:36:25 +0200 Subject: [PATCH] test: extend api matrix for android e2e tests (#690) * test: extend api matrix for android * ci: fix tests for api levels 34 and 35 * ci: fix sh script * ci: fix workflow sh script * ci: record video on android device * ci: fix artifacts name * ci: fix android biometric setup * ci: use macos latest * ci: improve android biometric setup --- .github/workflows/e2e_tests.yaml | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/.github/workflows/e2e_tests.yaml b/.github/workflows/e2e_tests.yaml index 80707411..f44c686f 100644 --- a/.github/workflows/e2e_tests.yaml +++ b/.github/workflows/e2e_tests.yaml @@ -80,6 +80,8 @@ jobs: - 31 - 32 - 33 + - 34 + - 35 steps: - name: Enable KVM group perms @@ -125,10 +127,13 @@ jobs: disable-animations: true avd-name: TestingAVD script: | + echo "Starting the screen recording..." + sleep 3 + adb shell "screenrecord --bugreport /data/local/tmp/screenrecord.mp4 & echo \$! > /data/local/tmp/screenrecord_pid.txt" & + adb shell settings put system pointer_location 1 adb shell locksettings set-pin 1111 - adb shell am start -a android.settings.SECURITY_SETTINGS sleep 3 - adb shell input tap 274 1150 + adb shell am start -a android.settings.BIOMETRIC_ENROLL sleep 3 adb shell input text 1111 adb shell input keyevent 66 @@ -144,20 +149,23 @@ jobs: adb -e emu finger touch 1 sleep 3 adb shell input keyevent KEYCODE_HOME + adb shell "kill -2 \$(cat /data/local/tmp/screenrecord_pid.txt)" + sleep 1 + adb pull /data/local/tmp/screenrecord.mp4 . cd KeychainExample yarn test:android:run - env: - API_LEVEL: ${{ matrix.api-level }} - name: Upload test artifacts if: ${{ failure() }} uses: actions/upload-artifact@v4 with: - name: android-test-artifacts - path: KeychainExample/artifacts + name: android-test-artifacts-${{ matrix.api-level }} + path: | + KeychainExample/artifacts + screenrecord.mp4 build-ios: name: Build and Test iOS - runs-on: macos-13 + runs-on: macos-latest steps: - name: Checkout