Skip to content

Commit a58894a

Browse files
author
Sunita Prajapati
committed
fix(ci): resolve Android SDK read-only issue in E2E workflows
-Add steps to dynamically locate and copy Android SDK to writable location -Set ANDROID_SDK_ROOT to prevent Gradle installation failures -Applies to both compat and latest Android jobs
1 parent 5882d84 commit a58894a

1 file changed

Lines changed: 24 additions & 0 deletions

File tree

.github/workflows/e2e-mobile-tests.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,18 @@ jobs:
5050
with:
5151
project-path: examples/E2E-compat
5252

53+
# Add these new steps to handle the read-only SDK issue
54+
- name: Find Android SDK path
55+
run: |
56+
SDK_PATH=$(find /nix/store -name "android-sdk" -type d | head -1)/libexec/android-sdk
57+
echo "ANDROID_SDK_PATH=$SDK_PATH" >> $GITHUB_ENV
58+
59+
- name: Copy Android SDK to writable location
60+
run: |
61+
mkdir -p $HOME/android-sdk
62+
cp -r $ANDROID_SDK_PATH/* $HOME/android-sdk/
63+
echo "ANDROID_SDK_ROOT=$HOME/android-sdk" >> $GITHUB_ENV
64+
5365
- name: Run Android E2E Tests
5466
working-directory: examples/E2E-compat
5567
run: devbox run --pure test:e2e:android
@@ -111,6 +123,18 @@ jobs:
111123
with:
112124
project-path: examples/E2E-latest
113125

126+
# Add these new steps to handle the read-only SDK issue
127+
- name: Find Android SDK path
128+
run: |
129+
SDK_PATH=$(find /nix/store -name "android-sdk" -type d | head -1)/libexec/android-sdk
130+
echo "ANDROID_SDK_PATH=$SDK_PATH" >> $GITHUB_ENV
131+
132+
- name: Copy Android SDK to writable location
133+
run: |
134+
mkdir -p $HOME/android-sdk
135+
cp -r $ANDROID_SDK_PATH/* $HOME/android-sdk/
136+
echo "ANDROID_SDK_ROOT=$HOME/android-sdk" >> $GITHUB_ENV
137+
114138
- name: Run Android E2E Tests
115139
working-directory: examples/E2E-latest
116140
run: devbox run --pure test:e2e:android

0 commit comments

Comments
 (0)