From 4ffd7ed9bffa5139277ffb91de5a69f2b714222c Mon Sep 17 00:00:00 2001 From: Harsh Shandilya Date: Fri, 17 Apr 2020 00:24:13 +0530 Subject: Enable emulator tests (#708) * github: Enable instrumentation testing in PRs Signed-off-by: Harsh Shandilya * Upgrade to Gradle 6.3 Signed-off-by: Harsh Shandilya * Remove outdated and broken tests, redo PasswordEntryTest in Kotlin Signed-off-by: Harsh Shandilya * Remove now unused test assets Signed-off-by: Harsh Shandilya * github: Disable debug APK uploads in PR testing Signed-off-by: Harsh Shandilya * Update .github/workflows/pull_request.yml * Update .github/workflows/pull_request.yml Switching to Ubuntu fails due to the SDK 29 missing. Co-authored-by: Fabian Henneke --- .github/workflows/pull_request.yml | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to '.github') diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 9d4d1f07..2e1fae0a 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -3,7 +3,10 @@ on: pull_request name: Check pull request jobs: test-pr: - runs-on: ubuntu-latest + runs-on: macos-latest + strategy: + matrix: + api-level: [23, 25, 27, 29] steps: - uses: actions/checkout@master @@ -16,9 +19,12 @@ jobs: path: ~/.gradle/caches key: gradle-${{ runner.os }}-${{ hashFiles('**/build.gradle') }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}-${{ hashFiles('**/dependencies.gradle') }} - - run: ./gradlew spotlessCheck assembleDebug testDebug lintDebug -Dpre-dex=false + - name: Run unit tests + run: ./gradlew spotlessCheck testDebug lintDebug -Dpre-dex=false - - uses: actions/upload-artifact@master + - name: Run instrumentation tests + uses: reactivecircus/android-emulator-runner@v2 with: - name: Debug APK - path: app/build/outputs/apk/debug/app-debug.apk + api-level: ${{ matrix.api-level }} + target: default + script: ./gradlew connectedCheck -- cgit v1.2.3