Skip to content

Run android instrumented tests #45

Run android instrumented tests

Run android instrumented tests #45

Workflow file for this run

name: Run android instrumented tests
# Run Android instrumented tests once every day at 1am UTC.
on:
schedule:
- cron: '0 1 * * *'
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true
env:
RAWG_API_KEY: ${{ secrets.RAWG_API_KEY }}
BUGSNAG_API_KEY: ${{ secrets.BUGSNAG_API_KEY }}
jobs:
androidTest:
runs-on: macos-latest # enables hardware acceleration in the virtual machine
timeout-minutes: 30
strategy:
matrix:
api-level: [ 29, 30, 31, 33, 34 ]
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'zulu'
- name: Setup Gradle
uses: gradle/[email protected]
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Run instrumentation tests
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: ${{ matrix.api-level }}
arch: x86_64
target: google_apis
disable-animations: true
disk-size: 6000M
heap-size: 600M
script: ./gradlew connectedDebugAndroidTest --stacktrace --daemon
- name: Upload test reports
if: always()
uses: actions/upload-artifact@v3
with:
name: test-reports-${{ matrix.api-level }}
path: ./**/build/reports