Testing reactivecircus/android-emulator-runner
to run tests with GMD
#1287
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Android CI | |
on: [ push ] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Project checkout | |
uses: actions/checkout@v4 | |
- name: Setup Android build | |
uses: ./.github/actions/setup-android-build | |
- name: Build | |
run: ./gradlew assemble | |
- name: Upload APK | |
if: success() | |
uses: actions/upload-artifact@v4 | |
with: | |
path: app/build/outputs/apk/debug/*.apk | |
code_analysis: | |
name: Code Analysis | |
runs-on: ubuntu-latest | |
steps: | |
- name: Project checkout | |
uses: actions/checkout@v4 | |
- name: Setup Android build | |
uses: ./.github/actions/setup-android-build | |
- name: Spotless check | |
run: ./gradlew spotlessCheck | |
unit_tests: | |
name: Unit Tests | |
runs-on: ubuntu-latest | |
steps: | |
- name: Project checkout | |
uses: actions/checkout@v4 | |
- name: Setup Android build | |
uses: ./.github/actions/setup-android-build | |
- name: Run tests | |
run: ./gradlew test | |
instrumented_tests: | |
name: Instrumented Tests | |
runs-on: ubuntu-latest | |
timeout-minutes: 30 | |
needs: [ build, code_analysis, unit_tests ] | |
steps: | |
- name: Project checkout | |
uses: actions/checkout@v4 | |
- name: Setup Android build | |
uses: ./.github/actions/setup-android-build | |
- name: Run instrumented tests | |
uses: reactivecircus/android-emulator-runner@v2 | |
with: | |
api-level: 34 | |
arch: x86_64 | |
disable-animations: true | |
disk-size: 6000M | |
heap-size: 600M | |
script: ./gradlew pixel8api34DebugAndroidTest | |
-Pandroid.experimental.androidTest.numManagedDeviceShards=1 | |
-Pandroid.experimental.testOptions.managedDevices.maxConcurrentDevices=1 | |
lint: | |
name: Lint | |
runs-on: ubuntu-latest | |
steps: | |
- name: Project checkout | |
uses: actions/checkout@v4 | |
- name: Setup Android build | |
uses: ./.github/actions/setup-android-build | |
- name: Build | |
run: ./gradlew lint | |
license-check: | |
name: License Check | |
runs-on: ubuntu-latest | |
steps: | |
- name: Project checkout | |
uses: actions/checkout@v4 | |
- name: Setup Android build | |
uses: ./.github/actions/setup-android-build | |
- name: Build | |
run: ./gradlew licensee |