chore: update dependencies #62
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: E2E tests on Expo Android project | |
on: | |
push: | |
branches: [main, '*-stable'] | |
paths: | |
- .github/workflows/expo-android.yml | |
- android/** | |
- src/v8runtime/** | |
- package.json | |
- bun.lockb | |
pull_request: | |
paths: | |
- .github/workflows/expo-android.yml | |
- android/** | |
- src/v8runtime/** | |
- package.json | |
- bun.lockb | |
jobs: | |
e2e-test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: oven-sh/setup-bun@v1 | |
- name: 🧹 Cleanup GitHub Linux runner disk space | |
uses: ./.github/actions/cleanup-linux-disk-space | |
- name: Use JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
- name: Restore node_modules caches | |
uses: actions/cache@v4 | |
with: | |
path: node_modules | |
key: ${{ runner.os }}-workspace-modules-${{ hashFiles('bun.lockb') }} | |
- name: Bun install | |
run: bun install --frozen-lockfile | |
- name: Generate TestApp | |
run: | | |
bunx create-expo-app -t blank@@sdk-51 TestApp | |
cd TestApp | |
bun add v8-android-jit | |
bun add file:../react-native-v8 | |
jq '.expo.android.package = "com.testapp" | .expo.plugins += ["react-native-v8"] | .expo.jsEngine = "jsc"' app.json > app.json.tmp && mv -f app.json.tmp app.json | |
echo 'if (global._v8runtime) { console.log(`=== V8 version[${global._v8runtime().version}] ===`); }' >> App.js | |
working-directory: .. | |
- name: Build TestApp | |
working-directory: ../TestApp | |
run: | | |
npx expo prebuild -p android | |
cd android | |
./gradlew :app:assembleRelease | |
- name: ⚙️ Enable KVM for Android virtualization | |
shell: bash | |
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: Run tests | |
uses: reactivecircus/android-emulator-runner@v2 | |
with: | |
api-level: 34 | |
arch: x86_64 | |
target: google_apis | |
working-directory: ../TestApp/android | |
script: | | |
adb install -r app/build/outputs/apk/release/app-release.apk | |
adb logcat -c | |
adb shell am start -n com.testapp/com.testapp.MainActivity | |
sleep 20 | |
adb logcat -d > adb.log | |
grep -E "=== V8 version\[.+\] ===" adb.log > /dev/null | |
- name: Collect failure files | |
if: failure() | |
run: | | |
cp ../TestApp/android/adb.log . | |
- name: Upload failed artifacts | |
if: failure() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: artifacts | |
path: | | |
adb.log |