name: Android CI

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

jobs:
  test:
    runs-on: macos-latest
    steps:
    - name: checkout
      uses: actions/checkout@v2
    - name: set up JDK 11
      uses: actions/setup-java@v1
      with:
        java-version: 11
    - name: run tests
      uses: reactivecircus/android-emulator-runner@v2
      with:
        api-level: 29
        script: ./gradlew connectedCheck
    - name: Upload Test Results
      if: ${{ always() }}
      uses: actions/upload-artifact@v2
      with:
         name: Test output
         path: /Users/runner/work/OpeningHoursFragment/OpeningHoursFragment/lib/build/reports/androidTests/connected/flavors/debugAndroidTest
    - name: Generate coverage report
      run: ./gradlew jacocoTestReport
    - name: SonarCloud Scan
      # note as we don't wait for processing to complete this will always succeed
      run: ./gradlew sonarqube -Dsonar.host.url=https://sonarcloud.io -Dsonar.organization=simonpoole-github --info
      env:
         # Needed to get some information about the pull request, if any
         GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
         # SonarCloud access token should be generated from https://sonarcloud.io/account/security/
         SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
name: Android CI

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

jobs:
  test:
    runs-on: macos-latest
    steps:
    - name: checkout
      uses: actions/checkout@v2
    - name: set up JDK 11
      uses: actions/setup-java@v1
      with:
        java-version: 11
    - name: run tests
      uses: reactivecircus/android-emulator-runner@v2
      with:
        api-level: 28
        script: ./gradlew connectedCheck
    - name: Upload Test Results
      if: ${{ always() }}
      uses: actions/upload-artifact@v2
      with:
         name: Test output
         path: /Users/runner/work/OpeningHoursFragment/OpeningHoursFragment/lib/build/reports/androidTests/connected/flavors/debugAndroidTest
    - name: Generate coverage report
      run: ./gradlew jacocoTestReport
    - name: SonarCloud Scan
      # note as we don't wait for processing to complete this will always succeed
      run: ./gradlew sonarqube -Dsonar.host.url=https://sonarcloud.io -Dsonar.organization=simonpoole-github --info
      env:
         # Needed to get some information about the pull request, if any
         GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
         # SonarCloud access token should be generated from https://sonarcloud.io/account/security/
         SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
Check if api-level 28 fixes things
Check if api-level 28 fixes things