|
91 | 91 |
|
92 | 92 | - uses: actions/checkout@v4 |
93 | 93 |
|
94 | | - - name: Checkout AVD snapshots |
95 | | - uses: actions/checkout@v4 |
96 | | - with: |
97 | | - repository: DorianMazur/react-native-keychain-avds |
98 | | - sparse-checkout: | |
99 | | - ${{ matrix.api-level }} |
100 | | - path: avd-snapshots |
101 | | - lfs: true |
102 | | - |
103 | | - - name: Setup AVD snapshots |
104 | | - run: | |
105 | | - mkdir -p ~/.android/avd |
106 | | - if [ -d "avd-snapshots/${{ matrix.api-level }}" ]; then |
107 | | - echo "Found AVD snapshot for API ${{ matrix.api-level }}" |
108 | | - cp -r avd-snapshots/${{ matrix.api-level }}/* ~/.android/avd/ |
109 | | - else |
110 | | - echo "ERROR: No pre-configured AVD snapshot found for API ${{ matrix.api-level }}" |
111 | | - echo "Please ensure the required snapshot exists in the repository." |
112 | | - exit 1 |
113 | | - fi |
114 | | -
|
115 | 94 | - name: Setup Node.js |
116 | 95 | uses: actions/setup-node@v4 |
117 | 96 | with: |
@@ -143,11 +122,34 @@ jobs: |
143 | 122 | api-level: ${{ matrix.api-level }} |
144 | 123 | arch: x86_64 |
145 | 124 | profile: pixel_6 |
146 | | - force-avd-creation: false |
147 | | - emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none |
148 | 125 | disable-animations: true |
149 | 126 | avd-name: TestingAVD |
150 | 127 | script: | |
| 128 | + echo "Starting the screen recording..." |
| 129 | + sleep 3 |
| 130 | + adb shell "screenrecord --bugreport /data/local/tmp/screenrecord.mp4 & echo \$! > /data/local/tmp/screenrecord_pid.txt" & |
| 131 | + adb shell settings put system pointer_location 1 |
| 132 | + adb shell locksettings set-pin 1111 |
| 133 | + sleep 3 |
| 134 | + adb shell am start -a android.settings.BIOMETRIC_ENROLL |
| 135 | + sleep 3 |
| 136 | + adb shell input text 1111 |
| 137 | + adb shell input keyevent 66 |
| 138 | + sleep 3 |
| 139 | + adb shell input tap 900 2200 |
| 140 | + sleep 3 |
| 141 | + adb shell input tap 900 2200 |
| 142 | + sleep 3 |
| 143 | + adb -e emu finger touch 1 |
| 144 | + sleep 3 |
| 145 | + adb -e emu finger touch 1 |
| 146 | + sleep 3 |
| 147 | + adb -e emu finger touch 1 |
| 148 | + sleep 3 |
| 149 | + adb shell input keyevent KEYCODE_HOME |
| 150 | + adb shell "kill -2 \$(cat /data/local/tmp/screenrecord_pid.txt)" |
| 151 | + sleep 1 |
| 152 | + adb pull /data/local/tmp/screenrecord.mp4 . |
151 | 153 | cd KeychainExample |
152 | 154 | yarn test:android:run |
153 | 155 | - name: Upload test artifacts |
|
0 commit comments