parent
0952b48748
commit
dc3649f8b0
@ -0,0 +1,58 @@ |
|||||||
|
name: Pull Request |
||||||
|
|
||||||
|
on: |
||||||
|
pull_request: |
||||||
|
jobs: |
||||||
|
ANDROID_BUILD_CHECKS: |
||||||
|
name: Assemble Debug |
||||||
|
runs-on: ubuntu-latest |
||||||
|
needs: [ ANDROID_UNIT_TESTS, ANDROID_EMULATOR_TESTS ] |
||||||
|
steps: |
||||||
|
- uses: actions/checkout@v2 |
||||||
|
- uses: actions/setup-java@v2 |
||||||
|
with: |
||||||
|
java-version: 11 |
||||||
|
distribution: temurin |
||||||
|
cache: gradle |
||||||
|
- name: Assemble debug build |
||||||
|
run: ./gradlew cameraview:assembleDebug --stacktrace |
||||||
|
ANDROID_UNIT_TESTS: |
||||||
|
name: Unit Tests |
||||||
|
runs-on: ubuntu-latest |
||||||
|
steps: |
||||||
|
- uses: actions/checkout@v2 |
||||||
|
- uses: actions/setup-java@v2 |
||||||
|
with: |
||||||
|
java-version: 11 |
||||||
|
distribution: temurin |
||||||
|
cache: gradle |
||||||
|
- name: Execute unit tests |
||||||
|
run: ./gradlew cameraview:runUnitTests --stacktrace |
||||||
|
|
||||||
|
ANDROID_EMULATOR_TESTS: |
||||||
|
name: Emulator Tests |
||||||
|
runs-on: macos-latest |
||||||
|
strategy: |
||||||
|
fail-fast: false |
||||||
|
matrix: |
||||||
|
EMULATOR_API: [22] |
||||||
|
include: |
||||||
|
- EMULATOR_API: 22 |
||||||
|
EMULATOR_ARCH: x86 |
||||||
|
steps: |
||||||
|
- uses: actions/checkout@v2 |
||||||
|
- uses: actions/setup-java@v2 |
||||||
|
with: |
||||||
|
java-version: 11 |
||||||
|
distribution: temurin |
||||||
|
cache: gradle |
||||||
|
- name: Execute emulator tests |
||||||
|
timeout-minutes: 30 |
||||||
|
uses: reactivecircus/android-emulator-runner@v2.21.0 |
||||||
|
with: |
||||||
|
api-level: ${{ matrix.EMULATOR_API }} |
||||||
|
arch: ${{ matrix.EMULATOR_ARCH }} |
||||||
|
disable-animations: true |
||||||
|
profile: Nexus 5X |
||||||
|
emulator-options: -no-snapshot -no-window -no-boot-anim -camera-back emulated -camera-front emulated -gpu swiftshader_indirect |
||||||
|
script: ./.github/workflows/emulator_script.sh |
Loading…
Reference in new issue