Skip to content

Commit

Permalink
level 25
Browse files Browse the repository at this point in the history
  • Loading branch information
bakoushin committed Oct 1, 2024
1 parent 185d94c commit bfa5b41
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 19 deletions.
19 changes: 2 additions & 17 deletions .github/scripts/setupAndroidEmulator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ $.echo('hw.sdCard=yes').toEnd(iniLocation)
$.echo('sdcard.size=1000M').toEnd(iniLocation)

const child = spawn(
`emulator -avd ${emulatorName} -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -writable-system`,
`emulator -avd ${emulatorName} -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim`,
{ detached: true, stdio: 'inherit', shell: true }
)

Expand All @@ -52,26 +52,11 @@ $.exec(
)
// Check the service is launched
$.exec('until [ `adb shell ps | grep butler | wc -l` -gt 0 ]; do sleep 3; done')
$.echo('Background service running!')

// Install latest root CA certificates
$.echo('Updating root CA cerificates...')
$.exec(
'wget -O android-ca.tar.gz https://android.googlesource.com/platform/system/ca-certificates/+archive/refs/heads/main/files.tar.gz'
)
$.exec('mkdir cacerts')
$.exec('tar -xzvf android-ca.tar.gz -C cacerts/')
$.exec('adb root')
$.exec('adb remount')
$.exec('adb push cacerts /system/etc/security/cacerts')

$.echo('Saving snapshot...')
$.echo('Background service running! Saving snapshot...')
$.exec('adb emu avd snapshot save ci_boot')
$.echo('Snapshot saved! Killing emulator...')
child.kill()

// Wait until the emulator is off
$.exec('until [ `adb devices | grep emulator | wc -l` -gt 0 ]; do sleep 3; done')

$.exec(`qemu-img snapshot -a ci_boot ~/.android/avd/${emulatorName}.avd/system.img.qcow2`)
$.exec(`qemu-img commit ~/.android/avd/${emulatorName}.avd/system.img.qcow2`)
1 change: 0 additions & 1 deletion .github/workflows/e2e-android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ jobs:
run: echo WALLET_CONNECT_PROJECT_ID_E2E=${{ secrets.WALLET_CONNECT_PROJECT_ID_E2E }} >> .env
- name: Create Detox Build
run: CELO_TEST_CONFIG=e2e yarn detox build -c android.release
- run: ls -lah ~/.android/avd/Pixel_API_${{ inputs.android-api-level }}_AOSP_x86_64.avd/snapshots
- name: Run Detox
run: >
yarn detox test
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/e2e-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
name: Android
uses: ./.github/workflows/e2e-android.yml
with:
android-api-level: 24
android-api-level: 25
secrets: inherit
#ios:
# name: iOS
Expand Down

0 comments on commit bfa5b41

Please sign in to comment.