Skip to content

Commit

Permalink
Migrate the rest of scripts to run tests on device
Browse files Browse the repository at this point in the history
  • Loading branch information
ospfranco committed Sep 8, 2024
1 parent 1f98c8f commit 8343899
Showing 1 changed file with 34 additions and 8 deletions.
42 changes: 34 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -325,11 +325,24 @@ jobs:
restore-keys: |
${{ runner.os }}-gradle-
- name: Build example for Android
env:
JAVA_OPTS: '-XX:MaxHeapSize=6g'
- name: Enable KVM
run: |
yarn turbo run build:android --cache-dir="${{ env.TURBO_CACHE_DIR }}"
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kvm
- name: Give execute permissions to script
run: chmod +x ./scripts/test-android.sh

- name: run tests
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 29
emulator-options: -no-window -no-boot-anim -no-audio -no-snapshot-load
script: |
adb wait-for-device
adb shell input keyevent 82
./scripts/test-android.sh
build-android-libsql:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -385,8 +398,21 @@ jobs:
restore-keys: |
${{ runner.os }}-gradle-
- name: Build example for Android
env:
JAVA_OPTS: '-XX:MaxHeapSize=6g'
- name: Enable KVM
run: |
yarn turbo run build:android --cache-dir="${{ env.TURBO_CACHE_DIR }}"
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kvm
- name: Give execute permissions to script
run: chmod +x ./scripts/test-android.sh

- name: run tests
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 29
emulator-options: -no-window -no-boot-anim -no-audio -no-snapshot-load
script: |
adb wait-for-device
adb shell input keyevent 82
./scripts/test-android.sh

0 comments on commit 8343899

Please sign in to comment.