From 7faeb48f8153495a7e73a2e2bd6879fd98a556e6 Mon Sep 17 00:00:00 2001 From: Saya Date: Mon, 2 Oct 2023 13:45:13 +1300 Subject: [PATCH] Copy workflow file to top github directory --- .github/workflows/github-actions-concept.yml | 63 ++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 .github/workflows/github-actions-concept.yml diff --git a/.github/workflows/github-actions-concept.yml b/.github/workflows/github-actions-concept.yml new file mode 100644 index 0000000000000..9d1a23ee977f1 --- /dev/null +++ b/.github/workflows/github-actions-concept.yml @@ -0,0 +1,63 @@ +name: GitHub Actions Concept +run-name: Android instrumentation tests proof of concept +on: [push] + +jobs: + connected-tests: + runs-on: macos-latest + + strategy: + matrix: + api-level: [26, 28, 30, 33] + target: [google_apis] + arch: [x86_64] + + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Set up JDK 17 + uses: actions/setup-java@v3 + with: + java-version: 17 + distribution: 'adopt' + cache: 'gradle' + + - 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-${{ matrix.api-level }} + + - name: Create AVD and generate snapshot for caching + if: steps.avd-cache.outputs.cache-hit != 'true' + uses: ReactiveCircus/android-emulator-runner@v2 + with: + api-level: ${{ matrix.api-level }} + target: ${{ matrix.target }} + arch: ${{ matrix.arch }} + working-directory: ./sdk/android + 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: Run connected tests + uses: ReactiveCircus/android-emulator-runner@v2 + with: + api-level: ${{ matrix.api-level }} + target: ${{ matrix.target }} + arch: ${{ matrix.arch }} + working-directory: ./sdk/android + force-avd-creation: false + avd-name: android-samples-avd + emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none + disable-animations: true + script: ./gradlew connectedCheck +