2019-12-15 21:49:18 +00:00
|
|
|
on: pull_request
|
|
|
|
|
|
|
|
name: Check pull request
|
2019-10-02 05:14:16 +00:00
|
|
|
jobs:
|
2019-12-15 21:49:18 +00:00
|
|
|
test-pr:
|
2020-04-16 18:54:13 +00:00
|
|
|
runs-on: macos-latest
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
api-level: [23, 25, 27, 29]
|
2019-10-02 05:14:16 +00:00
|
|
|
steps:
|
2019-12-31 15:27:38 +00:00
|
|
|
|
2019-10-02 05:14:16 +00:00
|
|
|
- uses: actions/checkout@master
|
2019-12-31 15:27:38 +00:00
|
|
|
|
2020-02-25 09:52:05 +00:00
|
|
|
- name: Copy CI gradle.properties
|
|
|
|
run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties
|
|
|
|
|
2019-12-31 15:27:38 +00:00
|
|
|
- uses: actions/cache@v1
|
|
|
|
with:
|
|
|
|
path: ~/.gradle/caches
|
|
|
|
key: gradle-${{ runner.os }}-${{ hashFiles('**/build.gradle') }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}-${{ hashFiles('**/dependencies.gradle') }}
|
|
|
|
|
2020-04-16 18:54:13 +00:00
|
|
|
- name: Run unit tests
|
|
|
|
run: ./gradlew spotlessCheck testDebug lintDebug -Dpre-dex=false
|
2019-12-31 15:27:38 +00:00
|
|
|
|
2020-04-16 18:54:13 +00:00
|
|
|
- name: Run instrumentation tests
|
|
|
|
uses: reactivecircus/android-emulator-runner@v2
|
2019-10-02 05:14:16 +00:00
|
|
|
with:
|
2020-04-16 18:54:13 +00:00
|
|
|
api-level: ${{ matrix.api-level }}
|
|
|
|
target: default
|
|
|
|
script: ./gradlew connectedCheck
|