From a3a2dd05df3c163ac616e9984312857de6333c63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jose=20Alc=C3=A9rreca?= Date: Tue, 22 Mar 2022 16:50:40 +0000 Subject: [PATCH] Updates to AGP alpha, gradle and adds GMD in GHA --- .github/workflows/blueprints.yaml | 78 +++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) diff --git a/.github/workflows/blueprints.yaml b/.github/workflows/blueprints.yaml index 6d217358a..0b479018f 100644 --- a/.github/workflows/blueprints.yaml +++ b/.github/workflows/blueprints.yaml @@ -77,3 +77,81 @@ jobs: with: name: test-reports path: app/build/reports/ + + + gradleManagedVirtualDevicesTest: + needs: build + runs-on: macos-latest + timeout-minutes: 30 + + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Copy CI gradle.properties + run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties + + - name: Set up JDK 11 + uses: actions/setup-java@v1 + with: + java-version: 11 + + - name: Generate cache key for Gradle cache + run: ./scripts/checksum.sh $SAMPLE_PATH checksum.txt + + - uses: actions/cache@v2 + with: + path: | + ~/.gradle/caches/modules-* + ~/.gradle/caches/jars-* + ~/.gradle/caches/build-cache-* + key: gradle-${{ hashFiles('checksum.txt') }} + + - name: Cache pixel2api30 system image + uses: actions/cache@v2 + with: + path: | + ~/.android/gradle/avd/dev30_aosp_x86_Pixel_2.* + ~/.android/gradle/avd/dev30_aosp_x86_64_Pixel_2.* + key: pixel2api30 + + - name: Cache pixel2api27 system image + uses: actions/cache@v2 + with: + path: ~/.android/gradle/avd/dev27_aosp_x86_Pixel_2.* + key: pixel2api27 + + - name: Cache nexus9api29 system image + uses: actions/cache@v2 + with: + path: ~/.android/gradle/avd/dev29_aosp_x86_Nexus_9.* + key: nexus9api29 + + - name: Run all tests + working-directory: ${{ env.SAMPLE_PATH }} + run: ./gradlew pixel2api30DebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.notAnnotation=com.example.android.testing.testconfigurationsample.TestDeviceLargeScreen" + + - name: Run regression tests + working-directory: ${{ env.SAMPLE_PATH }} + run: ./gradlew pixel2api27DebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.annotation=com.example.android.testing.testconfigurationsample.TestDeviceApi27 -Pandroid.testoptions.manageddevices.emulator.gpu="swiftshader_indirect" + + - name: Run large screen tests + working-directory: ${{ env.SAMPLE_PATH }} + run: ./gradlew -Dorg.gradle.workers.max=2 -i nexus9api29DebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.annotation=com.example.android.testing.testconfigurationsample.TestDeviceLargeScreen -Pandroid.testoptions.manageddevices.emulator.gpu="swiftshader_indirect" + + - name: Upload test reports + if: always() + uses: actions/upload-artifact@v2 + with: + name: test-reports + path: ${{ env.SAMPLE_PATH }}/app/build/reports/androidTests + + - name: Upload emulator logs + if: failure() + uses: actions/upload-artifact@v2 + with: + name: emulator-logs + path: | + ${{ env.SAMPLE_PATH }}/app/build/outputs/androidTest-results/managedDevice/** + !${{ env.SAMPLE_PATH }}/**/*:*.xml + !${{ env.SAMPLE_PATH }}/**/*|*