Skip to content
Prev Previous commit
Next Next commit
Enables tests for Owl in GHA
Change-Id: I787b7863ccec5ff180630bb631740424e9a7e3f5
  • Loading branch information
JoseAlcerreca committed Nov 20, 2020
commit 3bc7c1fe156006a9df1a21d94bb38b435856fe1e
47 changes: 47 additions & 0 deletions .github/workflows/Owl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,50 @@ jobs:
with:
name: build-reports
path: ${{ env.SAMPLE_PATH }}/app/build/reports

test:
needs: build
runs-on: macOS-latest # enables hardware acceleration in the virtual machine
timeout-minutes: 30
strategy:
matrix:
api-level: [23, 26, 29]

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 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8

- name: Generate cache key
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: Run instrumentation tests
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: ${{ matrix.api-level }}
arch: x86
disable-animations: true
script: ./gradlew connectedCheck --stacktrace
working-directory: ${{ env.SAMPLE_PATH }}

- name: Upload test reports
if: always()
uses: actions/upload-artifact@v2
with:
name: test-reports
path: ${{ env.SAMPLE_PATH }}/app/build/reports