name: Android

on: [push, pull_request]

jobs:
  test:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-java@v1
        with:
          java-version: '8'
      - name: Build debug
        run: bash ./gradlew build jacocoTestReport assembleAndroidTest
      - name: Echo
        run: echo no | android create avd --force -n test -t $ANDROID_TARGET --abi $ANDROID_ABI
      - name: Emulator
        run: emulator -avd test -no-skin -no-audio -no-window &
      - name: Wait for emulator
        run: android-wait-for-emulator
      - name: Run adb
        run: adb shell setprop dalvik.vm.dexopt-flags v=n,o=v
      - name: Check
        run: ./gradlew connectedCheck
      - name: Upload coverage to Codecov
        run: |
          curl -Os https://uploader.codecov.io/latest/linux/codecov
          chmod +x codecov
          ./codecov

name: Android

on: [push, pull_request]

jobs:
  test:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-java@v1
        with:
          java-version: '8'
      - name: Build debug
        run: bash ./gradlew build jacocoTestReport assembleAndroidTest
      - name: Echo
        run: echo no | android create avd --force -n test -t android-30 --abi armeabi-v7a
      - name: Emulator
        run: emulator -avd test -no-skin -no-audio -no-window &
      - name: Wait for emulator
        run: android-wait-for-emulator
      - name: Run adb
        run: adb shell setprop dalvik.vm.dexopt-flags v=n,o=v
      - name: Check
        run: ./gradlew connectedCheck
      - name: Upload coverage to Codecov
        run: |
          curl -Os https://uploader.codecov.io/latest/linux/codecov
          chmod +x codecov
          ./codecov

Update vars for android create
Update vars for android create
