diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8d62d28..c8dbfb3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -248,7 +248,6 @@ jobs: npm run test -- --grep "server" android_emulator_test: - if: false runs-on: ubuntu-latest timeout-minutes: 10 needs: [build_on_linux] @@ -316,6 +315,59 @@ jobs: working-directory: test script: npm run test -- --grep "Android API ${{ matrix.api_level }}" + android_emulator_test_windows: + runs-on: windows-latest + timeout-minutes: 10 + needs: [build_on_windows] + strategy: + matrix: + api_level: ['31', '36'] + fail-fast: false + + steps: + - uses: actions/checkout@v4 + + - name: Setup JDK 17 + uses: actions/setup-java@v4 + with: + java-version: '17' + distribution: 'adopt' + + - name: Set up Android SDK + uses: android-actions/setup-android@v3 + with: + cmdline-tools-version: 11479570 + + - name: Install Android SDK components + run: | + echo y | sdkmanager --licenses + sdkmanager "platform-tools" "platforms;android-${{ matrix.api_level }}" + sdkmanager "system-images;android-${{ matrix.api_level }};google_apis;x86_64" + sdkmanager "emulator" + + - name: Download windows build + uses: actions/download-artifact@v4 + with: + name: windows-build + path: . + + - name: npm install + run: | + cd test + npm install + + - name: run tests + uses: reactivecircus/android-emulator-runner@v2 + with: + api-level: ${{ matrix.api_level }} + arch: x86_64 + force-avd-creation: false + emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none + disable-animations: true + target: google_apis + working-directory: test + script: npm run test -- --grep "Android API ${{ matrix.api_level }}" + # - name: Run tests for Android API ${{ matrix.api_level }} # run: | # cd test