diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a53993af..95124b72 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 @@ -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