2020-02-23 20:26:57 +03:00
|
|
|
name: Android CI
|
2020-02-23 20:20:34 +03:00
|
|
|
|
2020-02-24 15:07:44 +03:00
|
|
|
on: [push, pull_request]
|
2020-02-23 20:20:34 +03:00
|
|
|
jobs:
|
2020-03-18 15:36:51 +03:00
|
|
|
validation:
|
|
|
|
name: Validate Gradle Wrapper
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: gradle/wrapper-validation-action@v1
|
|
|
|
|
2020-02-23 20:20:34 +03:00
|
|
|
test:
|
2020-04-19 00:19:23 +03:00
|
|
|
name: Unit Tests
|
2020-02-23 20:20:34 +03:00
|
|
|
runs-on: ubuntu-18.04
|
|
|
|
|
|
|
|
steps:
|
2020-03-18 15:40:36 +03:00
|
|
|
- uses: actions/checkout@v2
|
2020-02-23 20:20:34 +03:00
|
|
|
- name: set up JDK 1.8
|
|
|
|
uses: actions/setup-java@v1
|
|
|
|
with:
|
|
|
|
java-version: 1.8
|
|
|
|
- name: Unit tests
|
|
|
|
run: bash ./gradlew test --stacktrace
|
|
|
|
|
2020-04-19 00:19:23 +03:00
|
|
|
instrumented:
|
|
|
|
name: Android instrumented tests
|
|
|
|
runs-on: macos-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: set up JDK 1.8
|
|
|
|
uses: actions/setup-java@v1
|
|
|
|
with:
|
|
|
|
java-version: 1.8
|
|
|
|
- name: Android instrumented tests
|
|
|
|
uses: reactivecircus/android-emulator-runner@v2
|
|
|
|
with:
|
|
|
|
api-level: 29
|
|
|
|
script: ./gradlew connectDevDebugAndroidTest --stacktrace
|
|
|
|
|
2020-02-23 20:20:34 +03:00
|
|
|
apk:
|
|
|
|
name: Generate APK
|
|
|
|
runs-on: ubuntu-18.04
|
|
|
|
|
|
|
|
steps:
|
2020-03-18 15:40:36 +03:00
|
|
|
- uses: actions/checkout@v2
|
2020-02-23 20:20:34 +03:00
|
|
|
- name: set up JDK 1.8
|
|
|
|
uses: actions/setup-java@v1
|
|
|
|
with:
|
|
|
|
java-version: 1.8
|
|
|
|
- name: Build debug APK
|
2020-03-18 11:47:42 +03:00
|
|
|
run: bash ./gradlew assembleDev --stacktrace
|
2020-02-23 20:20:34 +03:00
|
|
|
- name: Upload APK
|
|
|
|
uses: actions/upload-artifact@v1
|
|
|
|
with:
|
2020-03-18 12:23:02 +03:00
|
|
|
name: app-dev-debug
|
2020-03-18 12:26:18 +03:00
|
|
|
path: app/build/outputs/apk/dev/debug/app-dev-debug.apk
|