Skip to content

Prepare for Gradle plugin release 4.0.3 #215

Prepare for Gradle plugin release 4.0.3

Prepare for Gradle plugin release 4.0.3 #215

Workflow file for this run

name: reaper checks
on:
push:
branches: [ main ]
paths:
- gradle/**
- gradle-plugin/**
- reaper/**
pull_request:
branches: [ main ]
paths:
- gradle/**
- gradle-plugin/**
- reaper/**
env:
GRADLE_OPTS: "-Dorg.gradle.jvmargs=-Xmx6g -Dorg.gradle.daemon=false -Dorg.gradle.vfs.watch=false -Dkotlin.incremental=false"
jobs:
device-spread-test:
runs-on: ubuntu-latest
defaults:
run:
working-directory: .
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Set up JDK 17
uses: actions/setup-java@v2
with:
java-version: '17'
distribution: 'adopt'
- name: Generate target APK
run: ./gradlew :reaper:sample:stress:assembleDebug -Pandroid.useAndroidX=true
env:
EMERGE_REAPER_API_KEY: ${{ secrets.EMERGE_REAPER_API_KEY }}
PR_SHA: ${{ github.event.pull_request.head.sha }}
PR_BASE_SHA: ${{ github.event.pull_request.base.sha }}
- name: Generate test APK
run: ./gradlew :reaper:sample:stress:assembleAndroidTest -Pandroid.useAndroidX=true
env:
EMERGE_REAPER_API_KEY: ${{ secrets.EMERGE_REAPER_API_KEY }}
PR_SHA: ${{ github.event.pull_request.head.sha }}
PR_BASE_SHA: ${{ github.event.pull_request.base.sha }}
- uses: google-github-actions/auth@v2
with:
project_id: ${{ secrets.FIREBASE_PROJECT_ID }}
credentials_json: ${{ secrets.GCLOUD_AUTH }}
- name: Set up GCloud
uses: google-github-actions/setup-gcloud@v2
with:
version: '>= 363.0.0'
- name: Set gcloud project
run: gcloud config set project ${{ secrets.FIREBASE_PROJECT_ID }}
- name: Run tests
run: |
gcloud firebase test android run \
--type instrumentation \
--app reaper/sample/stress/build/outputs/apk/debug/stress-debug.apk \
--test reaper/sample/stress/build/outputs/apk/androidTest/debug/stress-debug-androidTest.apk \
--device model=redfin,version=30,locale=en,orientation=portrait \
--device model=b0q,version=33,locale=en,orientation=portrait \
--device model=Nexus6P,version=26,locale=en,orientation=portrait \
--device model=HWMHA,version=24,locale=en,orientation=portrait \
--device model=Nexus6,version=25,locale=en,orientation=portrait \
minsdk-test:
runs-on: ubuntu-latest
defaults:
run:
working-directory: .
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Set up JDK 17
uses: actions/setup-java@v2
with:
java-version: '17'
distribution: 'adopt'
- name: Generate target APK
run: ./gradlew :reaper:sample:app:assembleDebug -Pandroid.useAndroidX=true
env:
EMERGE_REAPER_API_KEY: ${{ secrets.EMERGE_REAPER_API_KEY }}
PR_SHA: ${{ github.event.pull_request.head.sha }}
PR_BASE_SHA: ${{ github.event.pull_request.base.sha }}
- name: Generate test APK
run: ./gradlew :reaper:sample:app:assembleAndroidTest -Pandroid.useAndroidX=true
env:
EMERGE_REAPER_API_KEY: ${{ secrets.EMERGE_REAPER_API_KEY }}
PR_SHA: ${{ github.event.pull_request.head.sha }}
PR_BASE_SHA: ${{ github.event.pull_request.base.sha }}
- name: Run tests
uses: emulator-wtf/run-tests@v0
with:
api-token: ${{ secrets.EW_API_TOKEN }}
app: reaper/sample/app/build/outputs/apk/debug/app-debug.apk
test: reaper/sample/app/build/outputs/apk/androidTest/debug/app-debug-androidTest.apk
outputs-dir: build/test-results
devices: |
model=NexusLowRes,version=21
model=Pixel2,version=23
- name: Publish test report
uses: mikepenz/action-junit-report@v2
if: always() # always run even if the tests fail
with:
report_paths: 'build/test-results/**/*.xml'