Update actions/upload-artifact action to v4 #2238
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: Maestro tests | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
workflow_dispatch: | |
concurrency: | |
group: maestro-tests-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
maestro-tests: | |
runs-on: [ ubuntu-latest ] | |
steps: | |
- 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: Checkout Android source | |
uses: actions/checkout@v3 | |
- name: set up JDK | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: 17 | |
cache: 'gradle' | |
- name: Install Maestro | |
run: | | |
curl -Ls "https://get.maestro.mobile.dev" | bash | |
echo "$HOME/.maestro/bin" >> $GITHUB_PATH | |
- name: Cache AVD | |
uses: actions/cache@v4 | |
id: avd-cache | |
with: | |
path: | | |
~/.android/avd/* | |
~/.android/adb* | |
key: ${{ runner.os }}-avd-${{ env.AVD_API_LEVEL }}-${{ env.AVD_ARCH }} | |
- name: create AVD and generate snapshot for caching | |
if: steps.avd-cache.outputs.cache-hit != 'true' | |
uses: reactivecircus/android-emulator-runner@v2 | |
env: | |
AVD_API_LEVEL: 30 | |
AVD_ARCH: x86_64 | |
with: | |
api-level: ${{ env.AVD_API_LEVEL }} | |
arch: ${{ env.AVD_ARCH }} | |
force-avd-creation: false | |
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none | |
disable-animations: false | |
disk-size: 8G | |
script: echo "Generated AVD snapshot for caching." | |
- name: Maestro tests | |
id: run-maestro-tests | |
uses: reactivecircus/android-emulator-runner@v2 | |
with: | |
api-level: 31 | |
arch: x86_64 | |
disable-animations: true | |
disk-size: 8G | |
script: > | |
./gradlew | |
-PmaestroTests=true | |
-PsentryDsn="" | |
-PsentryEnvironment="" | |
-PmanifestEndpoint=${{ secrets.MANIFEST_ENDPOINT }} | |
:app:installStagingRelease | |
maestro test --format junit --output maestro-test-report.xml maestroUiFlows | |
adb uninstall org.simple.clinic.staging | |
- name: Upload test report | |
uses: actions/upload-artifact@v4 | |
with: | |
name: maestro-test-report | |
path: ./maestro-test-report.xml | |
if: always() |