Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
e87e744
feat: add end-to-end testing setup with Maestro
vivianjeng Oct 28, 2025
9db1e9f
feat: enhance E2E testing workflow for Android
vivianjeng Oct 28, 2025
dc3f965
refactor: simplify E2E testing workflow for iOS and Android
vivianjeng Oct 28, 2025
f8bc5d7
fix: run Metro bundler in the background for E2E testing workflow
vivianjeng Oct 28, 2025
d038ed1
chore: remove unnecessary build step from E2E workflow and add binary…
vivianjeng Oct 28, 2025
4586527
feat: enhance E2E workflow for iOS and Android testing
vivianjeng Oct 29, 2025
824bb84
feat: improve E2E workflow for iOS simulator and Android testing
vivianjeng Oct 29, 2025
a9a040e
feat: update E2E workflow for improved iOS and Android testing
vivianjeng Oct 29, 2025
8e4dce9
feat: update E2E workflow to include JDK setup and streamline iOS bui…
vivianjeng Oct 29, 2025
d175978
chore: update .gitignore to include build directory
vivianjeng Oct 29, 2025
cbb08a1
fix: update E2E workflow and test configuration for Android
vivianjeng Oct 29, 2025
f11c0f7
fix: update Circom proof test configuration in E2E workflow
vivianjeng Oct 29, 2025
b52c8a2
fix: enhance E2E workflow and Circom proof test reliability
vivianjeng Oct 29, 2025
e4cae33
fix: update E2E workflow and Circom proof test for improved reliability
vivianjeng Oct 30, 2025
318f964
fix: update E2E workflow for improved app launch and Android build pr…
vivianjeng Oct 30, 2025
aeb5bd8
fix: streamline E2E workflow by removing Metro bundler wait steps
vivianjeng Oct 30, 2025
2f13807
fix: update Circom proof test configuration for improved visibility a…
vivianjeng Oct 30, 2025
ea11812
fix: enhance Circom proof test configuration for improved visibility …
vivianjeng Oct 30, 2025
c576b2f
fix: update E2E workflow for improved Android testing and timeout con…
vivianjeng Oct 30, 2025
156321b
fix: refine E2E workflow and Circom proof test for improved execution
vivianjeng Oct 30, 2025
68d12e8
fix: extend timeout for Circom proof visibility assertion in E2E test
vivianjeng Oct 30, 2025
a9d6354
fix: update emulator options in E2E workflow for improved performance
vivianjeng Nov 1, 2025
9b3e307
fix: enhance E2E workflow with JDK setup and improved Android testing…
vivianjeng Nov 2, 2025
8262438
fix: optimize E2E workflow script for streamlined Android testing
vivianjeng Nov 2, 2025
63323f0
fix: enhance E2E workflow script for better organization and clarity
vivianjeng Nov 2, 2025
77c6e58
fix: update E2E workflow and configuration for improved reporting and…
vivianjeng Nov 2, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
266 changes: 161 additions & 105 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,126 +6,182 @@ jobs:
ios_e2e:
runs-on: macos-latest
env:
EXPO_NO_WAIT: true
CI: true
MAESTRO_CLI_NO_ANALYTICS: true
timeout-minutes: 30
steps:
- name: Checkout repo
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 20
cache: "npm"

- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: zulu
java-version: 21

- name: Install dependencies
run: npm ci

- name: Install Expo CLI
run: npm install -g expo-cli
- name: Install Maestro
run: |
curl -Ls "https://get.maestro.mobile.dev" | bash
echo "$HOME/.maestro/bin" >> $GITHUB_PATH

- name: Install applesimutils
run: |
brew tap wix/brew
brew install applesimutils

- name: Install CocoaPods dependencies
run: |
cd ios
pod install
cd ..

- name: Boot iOS Simulator
run: |
xcrun simctl shutdown all
xcrun simctl boot "iPhone 16"
xcrun simctl list devices | grep Booted
sleep 10

- name: Build and install iOS app
run: |
xcodebuild -scheme MyTestLibraryExample \
-workspace ios/MyTestLibraryExample.xcworkspace \
-configuration Debug \
-sdk iphonesimulator \
-derivedDataPath build \
-arch arm64

xcrun simctl install booted build/Build/Products/Debug-iphonesimulator/MyTestLibraryExample.app

- name: Run iOS Maestro tests
run: |
# Create reports directory
mkdir -p e2e/reports

# Start Metro bundler for tests
npm start &
METRO_PID=$!
sleep 10

# Run the app
xcrun simctl launch booted mytestlibrary.example || true
sleep 10

# Run the tests
npm run e2e:test

# Clean up
kill $METRO_PID 2>/dev/null || true
pkill -f "Metro" || true

- name: Upload test results
uses: actions/upload-artifact@v4
if: always()
with:
name: e2e-test-results-ios
path: e2e/reports/

- name: Upload screenshots
uses: actions/upload-artifact@v4
if: failure()
with:
name: e2e-screenshots-ios
path: e2e/reports/screenshots/

android_e2e:
runs-on: ubuntu-latest
env:
CI: true
MAESTRO_CLI_NO_ANALYTICS: true
timeout-minutes: 30

steps:
- name: Checkout repo
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: "npm"

- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: zulu
java-version: 21

- name: Install dependencies
run: npm ci

- name: Install Maestro
run: |
curl -Ls "https://get.maestro.mobile.dev" | bash
echo "$HOME/.maestro/bin" >> $GITHUB_PATH

- name: Android SDK
uses: android-actions/setup-android@v3

- name: Setup NDK
uses: nttld/setup-ndk@v1
with:
ndk-version: r26d

- name: Prebuild
run: npm run prebuild

# Build iOS and Android apps for E2E
- name: Build iOS for Detox
run: npm run e2e:build:ios

# Start Metro bundler in background
- name: Start Metro bundler
run: npx expo start --dev-client --port 8081 &

# Give Metro a few seconds to boot before launching Detox
- name: Wait for Metro
run: sleep 20

- name: Run iOS Detox tests
run: npm run e2e:test:ios

# TODO: Fix android e2e tests (No space left on device)
# android_e2e:
# runs-on: ubuntu-latest
# env:
# EXPO_NO_WAIT: true
# CI: true

# steps:
# - name: Checkout repo
# uses: actions/checkout@v3

# - name: Set up Node.js
# uses: actions/setup-node@v3
# with:
# node-version: 20

# - name: Install dependencies
# run: npm ci

# - name: Install Expo CLI
# run: npm install -g expo-cli

# - name: Android SDK
# uses: android-actions/setup-android@v3

# - name: Setup NDK
# uses: nttld/setup-ndk@v1
# with:
# ndk-version: r26d

# - name: Prebuild
# run: npm run prebuild

# - name: Start Metro bundler
# run: npx expo start --dev-client --port 8081 &

# - name: Wait for Metro
# run: |
# for i in {1..30}; do
# if nc -z localhost 8081; then
# echo "Metro is up!"
# break
# fi
# echo "Waiting for Metro..."
# sleep 2
# done

# - name: Enable KVM (faster emulator)
# 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: Clean workspace
# run: |
# echo "Cleaning unused caches..."
# sudo rm -rf $HOME/.gradle/caches/
# sudo rm -rf $HOME/.android/build-cache/
# sudo rm -rf android/app/build/
# sudo rm -rf /tmp/*
# sudo rm -rf /usr/local/lib/android/sdk/system-images

# - name: Build Android for Detox
# uses: reactivecircus/android-emulator-runner@v2
# with:
# api-level: 29
# target: google_apis
# arch: x86_64
# disable-animations: true
# disk-size: 2048M
# emulator-options: "-no-snapshot -no-boot-anim -no-window -gpu swiftshader_indirect -memory 4096 -cores 4"
# script: npm run e2e:build:android

# - name: Run Android Detox tests
# uses: reactivecircus/android-emulator-runner@v2
# with:
# api-level: 29
# target: google_apis
# arch: x86_64
# disable-animations: true
# disk-size: 2048M
# emulator-options: "-no-snapshot -no-boot-anim -no-window -gpu swiftshader_indirect -memory 4096 -cores 4"
# script: npm run e2e:build:android
run: npm run assets

- name: Enable KVM (faster emulator)
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: Free up disk space
run: |
sudo rm -rf /usr/share/dotnet /opt/ghc /usr/local/share/boost
sudo rm -rf $ANDROID_HOME/ndk || true
docker system prune -af || true

- name: Build Debug APK
run: |
npm run build:android

- name: Test Android with Maestro
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 29
target: default
arch: x86_64
disable-animations: true
emulator-options: "-no-snapshot -no-boot-anim -no-window -gpu swiftshader_indirect -memory 2048 -cores 2"
script: |
# Start Metro bundler for tests
npm start & METRO_PID=$!

# Build and install the app
cd android && ./gradlew assembleDebug && cd ..

# Install the app
adb install -r android/app/build/outputs/apk/debug/app-debug.apk

# Run the tests
npm run e2e:test

# Clean up
kill $METRO_PID 2>/dev/null || true && pkill -f "Metro" || true

- name: Upload test results
uses: actions/upload-artifact@v4
if: always()
with:
name: e2e-test-results-android
path: e2e/reports/

5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,13 @@ web-build/
expo-env.d.ts
# @end expo-cli

build/
ios/build
ios/.xcode.env.local
ios/Pods
MoproReactNativeBindings/android/build/
MoproReactNativeBindings/android/.gradle/
MoproReactNativeBindings/android/.cxx/
MoproReactNativeBindings/lib
MoproReactNativeBindings/lib

e2e/reports/
Binary file not shown.
Loading
Loading