Update Github Actions dependencies #59
Workflow file for this run
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: Tests | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
permissions: | |
checks: write | |
jobs: | |
unit-tests: | |
name: 'Unit tests' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout source code | |
uses: actions/checkout@v4 | |
- name: Set up Java | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
cache: gradle | |
- name: Run unit tests | |
run: ./gradlew testDebugUnitTest | |
- name: Upload unit test results | |
uses: mikepenz/action-junit-report@v4 | |
if: success() || failure() | |
with: | |
report_paths: 'app/build/test-results/testDebugUnitTest/TEST-*.xml' | |
detailed_summary: true | |
fail_on_failure: true | |
check_name: 'Unit tests report' | |
include_passed: true | |
instrumentation-tests: | |
name: 'Instrumentation tests' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout source code | |
uses: actions/checkout@v4 | |
- name: Enable KVM group perms | |
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: Set up Java | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
cache: gradle | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@v3 | |
- name: AVD cache | |
uses: actions/cache@v4 | |
id: avd-cache | |
with: | |
path: | | |
~/.android/avd/* | |
~/.android/adb* | |
key: avd-29 | |
- 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: 29 | |
avd-name: avd-29-test-runner | |
force-avd-creation: false | |
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none | |
disable-animations: true | |
script: echo "Generated AVD snapshot for caching." | |
- name: Run instrumentation tests | |
uses: reactivecircus/android-emulator-runner@v2 | |
with: | |
api-level: 29 | |
emulator-options: -no-window -gpu swiftshader_indirect -no-snapshot -noaudio -no-boot-anim -camera-back none | |
disable-animations: true | |
script: ./gradlew connectedCheck |