name: Instrumented test workflow

on:
  pull_request:
    branches:
      - master
  push:
    branches:
      - master

jobs:
  instrumented-tests:
    name: Run tests
    runs-on: macOS-latest
    strategy:
      fail-fast: false
      matrix:
        api-level: [23, 29]
        target: [default, google_apis]
        exclude:
          - api-level: 23
            target: google_apis
          - api-level: 29
            target: default
    steps:
      - uses: actions/checkout@v1
        with:
          fetch-depth: 1
      - uses: reactivecircus/android-emulator-runner@v1
        with:
          api-level: ${{ matrix.api-level }}
          target: ${{ matrix.target }}
          arch: x86_64
          script: ./gradlew connectedCheck
        env:
          CI: true
          JAVA_TOOL_OPTIONS: -Xmx3g
          GRADLE_OPTS: -Dorg.gradle.daemon=false -Dorg.gradle.workers.max=2 -Dkotlin.incremental=false -Dkotlin.compiler.execution.strategy=in-process

name: Instrumented test workflow

on:
  pull_request:
    branches:
      - master
  push:
    branches:
      - master

jobs:
  instrumented-tests:
    name: Run tests
    runs-on: macOS-latest
    strategy:
      matrix:
        api-level: [21, 23]
    steps:
      - uses: actions/checkout@v1
        with:
          fetch-depth: 1
      - uses: reactivecircus/android-emulator-runner@v1
        with:
          api-level: ${{ matrix.api-level }}
          script: ./gradlew connectedCheck
        env:
          CI: true
          JAVA_TOOL_OPTIONS: -Xmx3g
          GRADLE_OPTS: -Dorg.gradle.daemon=false -Dorg.gradle.workers.max=2 -Dkotlin.incremental=false -Dkotlin.compiler.execution.strategy=in-process

Test API 21 and 23.
Test API 21 and 23.
