Fix pipelines again #38
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: | |
- master | |
pull_request: | |
paths-ignore: | |
- 'docs/**' | |
- 'README.md' | |
jobs: | |
unit-tests: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Java | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'zulu' | |
java-version: '17' | |
- name: make gradlew executable | |
run: chmod +x gradlew | |
- name: run unit tests | |
run: ./gradlew :app:testReleaseUnitTest | |
- name: upload unit tests report | |
uses: actions/upload-artifact@v3 | |
with: | |
name: unit-tests-report | |
path: app/build/reports/tests/testReleaseUnitTest/** | |
retention-days: 2 | |
ui-tests: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- 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: Set up Java | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'zulu' | |
java-version: '17' | |
- name: make gradlew executable | |
run: chmod +x gradlew | |
- name: run ui tests | |
uses: reactivecircus/android-emulator-runner@v2.32.0 | |
with: | |
api-level: 29 | |
script: ./gradlew :app:connectedDebugAndroidTest | |
- name: upload ui tests report | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ui-tests-report | |
path: app/build/reports/androidTests/connected/** | |
retention-days: 2 |