Skip to content

Commit

Permalink
Updates to AGP alpha, gradle and adds GMD in GHA
Browse files Browse the repository at this point in the history
  • Loading branch information
JoseAlcerreca committed Mar 22, 2022
1 parent e1cad44 commit a3a2dd0
Showing 1 changed file with 78 additions and 0 deletions.
78 changes: 78 additions & 0 deletions .github/workflows/blueprints.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}/**/*|*

0 comments on commit a3a2dd0

Please sign in to comment.