Skip to content

Commit 6e675e4

Browse files
committed
use pixel 7
1 parent 4ad76a5 commit 6e675e4

1 file changed

Lines changed: 28 additions & 3 deletions

File tree

.github/workflows/e2e-tests.yml

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,14 @@ jobs:
5151
app: ${{ fromJson(needs.discover-apps.outputs.apps) }}
5252

5353
steps:
54+
- name: Delete unnecessary tools 🔧
55+
uses: jlumbroso/free-disk-space@v1.3.1
56+
with:
57+
android: false # Don't remove Android tools
58+
tool-cache: true # Remove image tool cache - rm -rf "$AGENT_TOOLSDIRECTORY"
59+
docker-images: false # Takes 16s, enable if needed in the future
60+
large-packages: false # includes google-cloud-sdk and it's slow
61+
5462
- name: Checkout code
5563
uses: actions/checkout@v4
5664

@@ -96,8 +104,8 @@ jobs:
96104
~/.android/adb*
97105
key: avd-${{ matrix.app }}
98106

99-
100-
- name: Run E2E tests
107+
- name: Create AVD and generate snapshot for caching
108+
if: steps.avd-cache.outputs.cache-hit != 'true'
101109
uses: reactivecircus/android-emulator-runner@v2
102110
with:
103111
working-directory: apps/${{ matrix.app }}/android
@@ -109,7 +117,24 @@ jobs:
109117
force-avd-creation: false
110118
avd-name: Pixel_8_API_35
111119
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
112-
script: ../../../scripts/run-tests-on-android.sh ${{ matrix.app }} 'test android-native'
120+
script: |
121+
echo "Generated AVD and snapshot for caching"
122+
123+
- name: Run E2E tests
124+
uses: reactivecircus/android-emulator-runner@v2
125+
with:
126+
working-directory: apps/${{ matrix.app }}/android
127+
api-level: 35
128+
arch: x86_64
129+
profile: pixel_7
130+
disk-size: 1G
131+
heap-size: 1G
132+
force-avd-creation: false
133+
avd-name: Pixel_8_API_35
134+
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
135+
script: |
136+
adb install -r "./app/build/outputs/apk/debug/app-debug.apk"
137+
pnpm nx run @react-native-harness/${{ matrix.app }}:start --args="test android-native"
113138
114139
- name: Upload test results
115140
if: always()

0 commit comments

Comments
 (0)