name: Android smoke test

on: [workflow_dispatch]

env:
  GRADLE_OPTS: "-Dorg.gradle.jvmargs=-Xmx4g -Dorg.gradle.daemon=false -Dkotlin.incremental=false"

jobs:
  instrumentation-tests:
    runs-on: macos-latest
    timeout-minutes: 30
    strategy:
      # Allow tests to continue on other devices if they fail on one device.
      fail-fast: false
      matrix:
        api-level:
          - 23
          - 26
          - 29
          #- 30 <- broken for now
    steps:
    - uses: actions/checkout@v2
    - name: Set up JDK 11
      uses: actions/setup-java@v1
      with:
        java-version: 11

    - name: Instrumentation Tests
      uses: reactivecircus/android-emulator-runner@v2
      with:
        api-level: ${{ matrix.api-level }}
        script: ./gradlew connectedDevDebugAndroidTest --stacktrace

    - name: Upload results
      if: ${{ always() }}
      uses: actions/upload-artifact@v2
      with:
        name: instrumentation-test-results ${{ matrix.api-level }}
        path: ./**/build/reports/androidTests/connected/**

Add initial workflow for smoke test.
Add initial workflow for smoke test.
