diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b196d6249..9b47be985 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -173,11 +173,59 @@ jobs: name: test-results-tooling-api-tests path: '**/build/reports/tests/' + run_connected_checks: + name: Run connected checks + runs-on: macos-latest + strategy: + matrix: + api-level: [ 26, 29, 32 ] + target: [ default ] + steps: + - name: Cancel previous runs + uses: styfle/cancel-workflow-action@0.12.0 + with: + access_token: ${{ github.token }} + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + java-version: ${{ env.BUILD_JAVA_VERSION }} + distribution: ${{ env.BUILD_JAVA_DIST }} + - name: Change Gradle wrapper permissions + run: chmod +x ./gradlew + - name: Restore cache + uses: actions/cache@v3 + with: + path: | + ~/.gradle/caches + ~/.gradle/wrapper + key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }} + restore-keys: | + ${{ runner.os }}-gradle- + - name: Run connected checks + uses: reactivecircus/android-emulator-runner@v2 + with: + api-level: ${{ matrix.api-level }} + target: ${{ matrix.target }} + arch: x86_64 + profile: Nexus 6 + script: ./gradlew connectedCheck + publish: name: Publish release runs-on: ubuntu-latest needs: [ build_apk, run_unit_tests, run_tooling_api_tests ] - if: ${{ always() && github.ref == 'refs/heads/main' && github.event_name != 'pull_request' && needs.build_apk.result == 'success' && needs.run_unit_tests.result == 'success' && needs.run_tooling_api_tests.result == 'success' }} + if: | + always() + && github.ref == 'refs/heads/main' + && github.event_name != 'pull_request' + && needs.build_apk.result == 'success' + && needs.run_unit_tests.result == 'success' + && needs.run_tooling_api_tests.result == 'success' + && needs.run_connected_checks.result == 'success' steps: - name: Checkout uses: actions/checkout@v4