From aec17621893f4dd25ee63243450467bb94e0d709 Mon Sep 17 00:00:00 2001 From: Sam Dozor Date: Mon, 13 Nov 2023 11:23:17 -0500 Subject: [PATCH] Update cross-platform-tests.yml Signed-off-by: Sam Dozor --- .github/workflows/cross-platform-tests.yml | 29 +++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/.github/workflows/cross-platform-tests.yml b/.github/workflows/cross-platform-tests.yml index a494d349a..07487d197 100644 --- a/.github/workflows/cross-platform-tests.yml +++ b/.github/workflows/cross-platform-tests.yml @@ -10,12 +10,36 @@ jobs: uses: actions/checkout@v3 with: repository: mParticle/crossplatform-sdk-tests + - name: "Checkout Android SDK Branch" uses: actions/checkout@v3 with: repository: ${{github.event.pull_request.head.repo.full_name}} ref: ${{github.head_ref}} path: .sdks/android + + - name: Gradle cache + uses: gradle/gradle-build-action@v2 + + - name: AVD cache + uses: actions/cache@v3 + id: avd-cache + with: + path: | + ~/.android/avd/* + ~/.android/adb* + key: avd-cache + + - name: create AVD and generate snapshot for caching + if: steps.avd-cache.outputs.cache-hit != 'true' + uses: reactivecircus/android-emulator-runner@d94c3fbe4fe6a29e4a5ba47c12fb47677c73656b #v2.28.0 + with: + api-level: 29 + force-avd-creation: false + emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none + disable-animations: false + script: echo "Generated AVD snapshot for caching." + - name: "Install JDK 11" uses: actions/setup-java@v3 with: @@ -27,9 +51,12 @@ jobs: node-version: 16 - run: npm install @actions/core - name: "Run Crossplatform Tests" - uses: reactivecircus/android-emulator-runner@b35b1c6e6921ebfd3f980c2236ac298f019df53a #v2.28.0 + uses: reactivecircus/android-emulator-runner@d94c3fbe4fe6a29e4a5ba47c12fb47677c73656b #v2.28.0 with: api-level: 29 + force-avd-creation: false + emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none + disable-animations: true script: ./gradlew runAndroid - name: "Archive Test Results" if: ${{ always() }}