Add instrumented tests to CI workflow

This commit is contained in:
XiangRongLin 2021-01-06 16:32:33 +01:00
parent ef2c76efaf
commit 0dbb212d13
1 changed files with 28 additions and 3 deletions

View File

@ -5,12 +5,12 @@ on:
branches:
- dev
push:
branches:
branches:
- dev
- master
jobs:
build-and-test:
build-and-test-jvm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
@ -32,7 +32,7 @@ jobs:
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: ${{ runner.os }}-gradle
- name: Build debug APK and run Tests
- name: Build debug APK and run jvm tests
run: ./gradlew assembleDebug lintDebug testDebugUnitTest --stacktrace
- name: Upload APK
@ -40,6 +40,31 @@ jobs:
with:
name: app
path: app/build/outputs/apk/debug/*.apk
test-android:
runs-on: macos-latest
strategy:
matrix:
api-level: [21, 29]
steps:
- uses: actions/checkout@v2
- name: set up JDK 1.8
uses: actions/setup-java@v1.4.3
with:
java-version: 1.8
- name: Cache Gradle dependencies
uses: actions/cache@v2
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: ${{ runner.os }}-gradle
- name: Run android tests
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: ${{ matrix.api-level }}
script: ./gradlew connectedCheck
# sonar:
# runs-on: ubuntu-latest
# steps: