Summary View: Show error message if no activities #186
This file contains 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: Test | |
on: [ push ] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
api-level: [ 29 ] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: set up java | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '21' | |
distribution: 'temurin' | |
cache: gradle | |
- name: Setup gradle | |
uses: gradle/actions/setup-gradle@v3 | |
- name: Run tests | |
run: ./gradlew testDebug | |
- name: Upload test results | |
if: always() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: test_report | |
path: app/build/reports/tests | |
# Unfortunately this does not work | |
# TODO: investigate why | |
# # https://github.com/marketplace/actions/android-emulator-runner#usage--examples | |
# - name: Enable KVM | |
# run: | | |
# echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules | |
# sudo udevadm control --reload-rules | |
# sudo udevadm trigger --name-match=kvm | |
# | |
# - name: AVD cache | |
# uses: actions/cache@v4 | |
# id: avd-cache | |
# with: | |
# path: | | |
# ~/.android/avd/* | |
# ~/.android/adb* | |
# key: avd-${{ matrix.api-level }} | |
# | |
# - name: create AVD and generate snapshot for caching | |
# if: steps.avd-cache.outputs.cache-hit != 'true' | |
# uses: reactivecircus/android-emulator-runner@v2 | |
# with: | |
# api-level: ${{ matrix.api-level }} | |
# force-avd-creation: false | |
# emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none | |
# disable-animations: false | |
# script: echo "Generated AVD snapshot for caching." | |
# | |
# - name: Run Android tests | |
# uses: reactivecircus/android-emulator-runner@v2 | |
# with: | |
# api-level: ${{ matrix.api-level }} | |
# force-avd-creation: false | |
# emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none | |
# disable-animations: true | |
# script: ./gradlew connectedAndroidTest | |
# | |
# - name: Upload tests reports | |
# uses: actions/upload-artifact@v4 | |
# with: | |
# name: Test results api-${{ matrix.api-level }} | |
# path: '*/build/outputs/androidTest-results' |