Skip to content

Commit 69ea0f6

Browse files
authored
Merge pull request #448 from joreilly/maestro
enable maestro test again
2 parents bf36c4e + dfad2f6 commit 69ea0f6

File tree

1 file changed

+73
-71
lines changed

1 file changed

+73
-71
lines changed

.github/workflows/maestro.yml

Lines changed: 73 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -1,71 +1,73 @@
1-
#name: Maestro UI tests
2-
#
3-
#on: pull_request
4-
#
5-
#jobs:
6-
# test:
7-
# runs-on: ubuntu-24.04
8-
# steps:
9-
# - uses: actions/checkout@v5
10-
#
11-
# - name: Enable KVM
12-
# run: |
13-
# echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
14-
# sudo udevadm control --reload-rules
15-
# sudo udevadm trigger --name-match=kvm
16-
#
17-
# - name: Set up Gradle cache
18-
# uses: gradle/actions/setup-gradle@v4
19-
#
20-
# - uses: actions/setup-java@v5
21-
# with:
22-
# distribution: 'zulu'
23-
# java-version: 17
24-
#
25-
# # Cache Android SDK system images to avoid re-downloading emulator images
26-
# - name: Cache Android SDK system images
27-
# uses: actions/cache@v4
28-
# with:
29-
# path: /usr/local/lib/android/sdk/system-images
30-
# key: ${{ runner.os }}-android-sdk-system-images-api-30-default-x86_64
31-
# restore-keys: |
32-
# ${{ runner.os }}-android-sdk-system-images-
33-
#
34-
# # Cache the AVD directory so the emulator can reuse a pre-created snapshot
35-
# - name: Cache AVD
36-
# uses: actions/cache@v4
37-
# with:
38-
# path: ~/.android/avd
39-
# key: ${{ runner.os }}-avd-api-32-default-x86_64
40-
# restore-keys: |
41-
# ${{ runner.os }}-avd-
42-
#
43-
# # Cache Maestro CLI installation
44-
# - name: Cache Maestro
45-
# uses: actions/cache@v4
46-
# with:
47-
# path: ~/.maestro
48-
# key: ${{ runner.os }}-maestro-v1
49-
# restore-keys: |
50-
# ${{ runner.os }}-maestro-
51-
#
52-
# - name: Build android app
53-
# run: ./gradlew :app:assembleDebug
54-
#
55-
# - uses: dniHze/maestro-test-action@v1
56-
#
57-
# - name: Run Maestro tests
58-
# uses: reactivecircus/android-emulator-runner@v2
59-
# with:
60-
# api-level: 32
61-
# arch: x86_64
62-
# profile: Nexus 6
63-
# avd-name: peopleinspace-api32
64-
# emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
65-
# disable-animations: true
66-
# script: adb install ./app/build/outputs/apk/debug/app-debug.apk && maestro test maestro/PeopleInSpace.flow
67-
#
68-
# - uses: actions/upload-artifact@v4
69-
# with:
70-
# name: screenshot
71-
# path: PeopleInSpace.png
1+
name: Maestro UI tests
2+
3+
on: pull_request
4+
5+
jobs:
6+
test:
7+
runs-on: ubuntu-24.04
8+
steps:
9+
- uses: actions/checkout@v5
10+
11+
- name: Enable KVM
12+
run: |
13+
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
14+
sudo udevadm control --reload-rules
15+
sudo udevadm trigger --name-match=kvm
16+
17+
- name: Set up Gradle cache
18+
uses: gradle/actions/setup-gradle@v4
19+
20+
- uses: actions/setup-java@v5
21+
with:
22+
distribution: 'zulu'
23+
java-version: 17
24+
25+
# Cache Android SDK system images to avoid re-downloading emulator images
26+
- name: Cache Android SDK system images
27+
uses: actions/cache@v4
28+
with:
29+
path: /usr/local/lib/android/sdk/system-images
30+
key: ${{ runner.os }}-android-sdk-system-images-api-30-default-x86_64
31+
restore-keys: |
32+
${{ runner.os }}-android-sdk-system-images-
33+
34+
# Cache the AVD directory so the emulator can reuse a pre-created snapshot
35+
- name: Cache AVD
36+
uses: actions/cache@v4
37+
with:
38+
path: ~/.android/avd
39+
key: ${{ runner.os }}-avd-api-32-default-x86_64
40+
restore-keys: |
41+
${{ runner.os }}-avd-
42+
43+
# Cache Maestro CLI installation
44+
- name: Cache Maestro
45+
uses: actions/cache@v4
46+
with:
47+
path: ~/.maestro
48+
key: ${{ runner.os }}-maestro-v1
49+
restore-keys: |
50+
${{ runner.os }}-maestro-
51+
52+
- name: Build android app
53+
run: ./gradlew :app:assembleDebug
54+
55+
- uses: dniHze/maestro-test-action@v1
56+
with:
57+
version: 2.0.3
58+
59+
- name: Run Maestro tests
60+
uses: reactivecircus/android-emulator-runner@v2
61+
with:
62+
api-level: 32
63+
arch: x86_64
64+
profile: Nexus 6
65+
avd-name: peopleinspace-api32
66+
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
67+
disable-animations: true
68+
script: adb install ./app/build/outputs/apk/debug/app-debug.apk && maestro test maestro/PeopleInSpace.flow
69+
70+
- uses: actions/upload-artifact@v4
71+
with:
72+
name: screenshot
73+
path: PeopleInSpace.png

0 commit comments

Comments
 (0)