@@ -160,4 +160,119 @@ jobs:
160160 arch : x86_64
161161 avd-name : api34
162162 emulator-boot-timeout : 900
163- script : cd Example/e2etest && E2E_PLATFORM=android bunx detox test --configuration android.emu.release --headless --record-logs all
163+ script : cd Example/e2etest && E2E_PLATFORM=android bunx detox test --configuration android.emu.release --headless --record-logs all --retries 1
164+
165+ - name : Upload Detox artifacts
166+ if : failure()
167+ uses : actions/upload-artifact@v4
168+ with :
169+ name : e2e-android-detox-artifacts
170+ path : Example/e2etest/artifacts
171+ if-no-files-found : ignore
172+ retention-days : 7
173+
174+ e2e-android-arm :
175+ runs-on : ubuntu-24.04-arm
176+ timeout-minutes : 30
177+ continue-on-error : true
178+ steps :
179+ - name : Checkout react-native-update
180+ uses : actions/checkout@v6
181+ with :
182+ submodules : recursive
183+
184+ - name : Checkout react-native-update-cli
185+ uses : actions/checkout@v6
186+ with :
187+ repository : reactnativecn/react-native-update-cli
188+ path : react-native-update-cli
189+
190+ - name : Setup Node.js
191+ uses : actions/setup-node@v6
192+ with :
193+ node-version : 22
194+
195+ - name : Setup Bun
196+ uses : oven-sh/setup-bun@v2
197+ with :
198+ bun-version : latest
199+
200+ - name : Cache Bun dependencies
201+ uses : actions/cache@v4
202+ with :
203+ path : ~/.bun/install/cache
204+ key : ${{ runner.os }}-${{ runner.arch }}-bun-e2e-${{ hashFiles('Example/e2etest/bun.lock', 'react-native-update-cli/bun.lock') }}
205+ restore-keys : |
206+ ${{ runner.os }}-${{ runner.arch }}-bun-e2e-
207+
208+ - name : Setup Java
209+ uses : actions/setup-java@v5
210+ with :
211+ distribution : temurin
212+ java-version : ' 17'
213+ cache : gradle
214+ cache-dependency-path : |
215+ Example/e2etest/bun.lock
216+ Example/e2etest/android/*.gradle
217+ Example/e2etest/android/**/*.gradle
218+ Example/e2etest/android/gradle/wrapper/gradle-wrapper.properties
219+
220+ - name : Enable KVM
221+ run : |
222+ echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
223+ sudo udevadm control --reload-rules
224+ sudo udevadm trigger --name-match=kvm
225+
226+ - name : Install e2etest dependencies
227+ run : cd Example/e2etest && bun install --frozen-lockfile
228+
229+ - name : Link local react-native-update
230+ run : |
231+ set -euo pipefail
232+ export LOCAL_RNU_VERSION="$(node -p "require('./Example/e2etest/node_modules/react-native-update/package.json').version")"
233+ LOCAL_RNU_DIR="$PWD/Example/e2etest/.e2e-artifacts/local-react-native-update"
234+ rm -rf "$LOCAL_RNU_DIR" Example/e2etest/node_modules/react-native-update
235+ mkdir -p "$LOCAL_RNU_DIR"
236+ cp package.json react-native-update.podspec react-native.config.js expo-module.config.json "$LOCAL_RNU_DIR"/
237+ rsync -a --exclude='.git' src ios android cpp scripts "$LOCAL_RNU_DIR"/
238+ node -e "const fs = require('fs'); const file = 'Example/e2etest/.e2e-artifacts/local-react-native-update/package.json'; const pkg = JSON.parse(fs.readFileSync(file, 'utf8')); pkg.version = process.env.LOCAL_RNU_VERSION; fs.writeFileSync(file, JSON.stringify(pkg, null, 2) + '\n');"
239+ ln -s ../.e2e-artifacts/local-react-native-update Example/e2etest/node_modules/react-native-update
240+
241+ - name : Install react-native-update-cli dependencies
242+ run : cd react-native-update-cli && bun install --frozen-lockfile && bun run build
243+
244+ - name : Detox build (android.emu.release arm64)
245+ env :
246+ DETOX_ANDROID_ARCHS : arm64-v8a
247+ DETOX_AVD_NAME : api34-arm64
248+ run : cd Example/e2etest && E2E_PLATFORM=android bunx detox build --configuration android.emu.release
249+
250+ - name : Prepare local update artifacts
251+ env :
252+ E2E_PLATFORM : android
253+ RNU_CLI_ROOT : ${{ github.workspace }}/react-native-update-cli
254+ run : cd Example/e2etest && bun run prepare:e2e
255+
256+ - name : Detox test (android.emu.release arm64)
257+ uses : reactivecircus/android-emulator-runner@v2
258+ env :
259+ DETOX_ANDROID_ARCHS : arm64-v8a
260+ RNU_CLI_ROOT : ${{ github.workspace }}/react-native-update-cli
261+ RNU_E2E_SKIP_PREPARE : ' true'
262+ DETOX_AVD_NAME : api34-arm64
263+ with :
264+ api-level : 34
265+ target : google_apis
266+ arch : arm64-v8a
267+ avd-name : api34-arm64
268+ emulator-boot-timeout : 900
269+ script : cd Example/e2etest && E2E_PLATFORM=android bunx detox test --configuration android.emu.release --headless --record-logs all --retries 1
270+
271+ - name : Upload Detox artifacts
272+ if : failure()
273+ uses : actions/upload-artifact@v4
274+ with :
275+ name : e2e-android-arm-detox-artifacts
276+ path : Example/e2etest/artifacts
277+ if-no-files-found : ignore
278+ retention-days : 7
0 commit comments