name: CI

on: [push]

jobs:
  build:
    runs-on: ubuntu-latest

    steps:
    - name: checkout
      uses: actions/checkout@v2

    - name: Build the project
      run: ./gradlew build

  connectedCheck:
    runs-on: macos-latest

    strategy:
      fail-fast: false
      matrix:
        api-level: [23, 29, 30]
        target: [google_apis]

    steps:
    - name: checkout
      uses: actions/checkout@v2

    - name: run connectedCheck
      uses: reactivecircus/android-emulator-runner@v2.11.0
      with:
        api-level: ${{ matrix.api-level }}
        ndk: 21.0.6113669
        cmake: 3.10.2.4988404
        target: ${{ matrix.target }}
        arch: x86_64
        profile: Nexus 6
        script: ./gradlew connectedCheck mergeAndroidReports --continue

    - name: Archive the test reports
      uses: actions/upload-artifact@v2
      if: failure()
      with:
        name: androidTest-results
        path: build/androidTest-results

name: CI

on: [push]

jobs:
  build:
    runs-on: ubuntu-latest

    steps:
    - name: checkout
      uses: actions/checkout@v2

    - name: Build the project
      run: ./gradlew build

  connectedCheck:
    runs-on: macos-latest

    strategy:
      fail-fast: false
      matrix:
        api-level: [23, 29, 30]
        target: [google_apis]

    steps:
    - name: checkout
      uses: actions/checkout@v2

    - name: run connectedCheck
      uses: reactivecircus/android-emulator-runner@v2.11.0
      with:
        api-level: ${{ matrix.api-level }}
        ndk: 21.0.6113669
        cmake: 3.10.2.4988404
        target: ${{ matrix.target }}
        arch: x86_64
        profile: Nexus 6
        script: ./gradlew connectedCheck mergeAndroidReports --continue

    - name: Archive the test reports
      uses: actions/upload-artifact@v2
      if: failure()
      with:
        name: androidTest-results-${{ matrix.api-level }}-${{ matrix.target }}
        path: build/androidTest-results

Use different artifact names for all matrix builds
Use different artifact names for all matrix builds
