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:
|
2020-04-18 18:16:40 +00:00
|
|
|
api-level: [23, 29]
|
|
|
|
variant: [Debug, Release]
|
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
|
2020-04-18 18:16:40 +00:00
|
|
|
run: ./gradlew spotlessCheck test${{ matrix.variant }} lint${{ matrix.variant}} -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
|