Refactor CI configuration for Android tests #2
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 Instrumentation Tests" | |
on: [ push, pull_request ] | |
jobs: | |
instrumentation_tests: | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout repository | |
uses: actions/checkout@v4 | |
- name: set up JDK 21 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: '21' | |
- name: set up Android SDK | |
uses: android-actions/setup-android@v3 | |
- name: build app apk | |
run: bash ./gradlew assembleDebug | |
- name: build android test apk | |
run: bash ./gradlew assembleAndroidTest | |
- name: run tests | |
uses: emulator-wtf/run-tests@v0 | |
with: | |
api-token: ${{ secrets.EW_API_TOKEN }} | |
app: app/build/outputs/apk/debug/app-debug.apk | |
test: app/build/outputs/apk/androidTest/debug/app-debug-androidTest.apk | |
outputs-dir: build/test-results | |
- name: publish test results | |
uses: mikepenz/action-junit-report@v5 | |
if: always() | |
with: | |
report_paths: 'build/test-results/**/*.xml' | |