chore: add device definitions and update lock files from sync #3
Workflow file for this run
This file contains hidden or 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
| tname: Full E2E Tests | ||
| on: | ||
| workflow_dispatch: | ||
| inputs: | ||
| run_android: | ||
| description: 'Run Android tests' | ||
| type: boolean | ||
| default: true | ||
| run_ios: | ||
| description: 'Run iOS tests' | ||
| type: boolean | ||
| default: true | ||
| run_react_native: | ||
| description: 'Run React Native tests' | ||
| type: boolean | ||
| default: true | ||
| schedule: | ||
| # Run weekly on Monday at 00:00 UTC | ||
| - cron: '0 0 * * 1' | ||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.ref }} | ||
| cancel-in-progress: true | ||
| jobs: | ||
| # Android example E2E tests (min/max devices) | ||
| android-e2e: | ||
| name: Android E2E - ${{ matrix.device }} | ||
| if: ${{ github.event_name == 'schedule' || inputs.run_android }} | ||
| runs-on: ubuntu-24.04 | ||
| timeout-minutes: 45 | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| device: [min, max] | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Enable KVM | ||
| 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: Setup Gradle cache | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: | | ||
| ~/.gradle/caches | ||
| ~/.gradle/wrapper | ||
| key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-gradle- | ||
| - name: Install Devbox | ||
| uses: jetify-com/devbox-install-action@v0.14.0 | ||
| with: | ||
| enable-cache: true | ||
| - name: Run Android E2E test | ||
| working-directory: examples/android | ||
| env: | ||
| EMU_HEADLESS: 1 | ||
| BOOT_TIMEOUT: 240 | ||
| TEST_TIMEOUT: 600 | ||
| ANDROID_DEFAULT_DEVICE: ${{ matrix.device }} | ||
| TEST_TUI: false | ||
| run: devbox run --pure test:e2e | ||
| - name: Upload reports and logs | ||
| if: always() | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: android-${{ matrix.device }}-reports | ||
| path: | | ||
| examples/android/reports/ | ||
| examples/android/app/build/outputs/ | ||
| retention-days: 7 | ||
| # iOS example E2E tests (min/max devices) | ||
| ios-e2e: | ||
| name: iOS E2E - ${{ matrix.device }} | ||
| if: ${{ github.event_name == 'schedule' || inputs.run_ios }} | ||
| runs-on: ${{ matrix.os }} | ||
| timeout-minutes: 45 | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| include: | ||
| - device: min | ||
| os: macos-14 | ||
| - device: max | ||
| os: macos-15 | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Setup CocoaPods cache | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: | | ||
| ~/.cocoapods/repos | ||
| ~/Library/Caches/CocoaPods | ||
| key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-pods- | ||
| - name: Setup Xcode build cache | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: | | ||
| ~/Library/Developer/Xcode/DerivedData | ||
| key: ${{ runner.os }}-xcode-${{ hashFiles('**/*.xcodeproj/**', '**/*.xcworkspace/**') }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-xcode- | ||
| - name: Install Devbox | ||
| uses: jetify-com/devbox-install-action@v0.14.0 | ||
| with: | ||
| enable-cache: true | ||
| - name: Run iOS E2E test | ||
| working-directory: examples/ios | ||
| env: | ||
| SIM_HEADLESS: 1 | ||
| BOOT_TIMEOUT: 180 | ||
| TEST_TIMEOUT: 600 | ||
| IOS_DEFAULT_DEVICE: ${{ matrix.device }} | ||
| TEST_TUI: false | ||
| run: devbox run --pure test:e2e | ||
| - name: Upload reports and logs | ||
| if: always() | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: ios-${{ matrix.device }}-reports | ||
| path: | | ||
| examples/ios/reports/ | ||
| ~/Library/Logs/CoreSimulator/ | ||
| retention-days: 7 | ||
| # React Native E2E tests (Android min/max, iOS min/max, Web) | ||
| react-native-e2e: | ||
| name: React Native E2E - ${{ matrix.platform }}-${{ matrix.device }} | ||
| if: ${{ github.event_name == 'schedule' || inputs.run_react_native }} | ||
| runs-on: ${{ matrix.os }} | ||
| timeout-minutes: 60 | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| include: | ||
| # Android tests | ||
| - platform: android | ||
| device: min | ||
| os: ubuntu-24.04 | ||
| - platform: android | ||
| device: max | ||
| os: ubuntu-24.04 | ||
| # iOS tests | ||
| - platform: ios | ||
| device: min | ||
| os: macos-14 | ||
| - platform: ios | ||
| device: max | ||
| os: macos-15 | ||
| # Web test (fast, no device needed) | ||
| - platform: web | ||
| device: none | ||
| os: ubuntu-24.04 | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Setup Node.js with cache | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: '20' | ||
| cache: 'npm' | ||
| cache-dependency-path: examples/react-native/package-lock.json | ||
| - name: Enable KVM (Android only) | ||
| if: matrix.platform == 'android' | ||
| 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: Setup Gradle cache (Android only) | ||
| if: matrix.platform == 'android' | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: | | ||
| ~/.gradle/caches | ||
| ~/.gradle/wrapper | ||
| key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-gradle- | ||
| - name: Setup CocoaPods cache (iOS only) | ||
| if: matrix.platform == 'ios' | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: | | ||
| ~/.cocoapods/repos | ||
| ~/Library/Caches/CocoaPods | ||
| key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-pods- | ||
| - name: Setup Xcode build cache (iOS only) | ||
| if: matrix.platform == 'ios' | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: | | ||
| ~/Library/Developer/Xcode/DerivedData | ||
| key: ${{ runner.os }}-xcode-${{ hashFiles('**/*.xcodeproj/**', '**/*.xcworkspace/**') }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-xcode- | ||
| - name: Install Devbox | ||
| uses: jetify-com/devbox-install-action@v0.14.0 | ||
| with: | ||
| enable-cache: true | ||
| - name: Run React Native E2E test | ||
| working-directory: examples/react-native | ||
| env: | ||
| EMU_HEADLESS: ${{ matrix.platform == 'android' && '1' || '0' }} | ||
| SIM_HEADLESS: ${{ matrix.platform == 'ios' && '1' || '0' }} | ||
| BOOT_TIMEOUT: 300 | ||
| TEST_TIMEOUT: 900 | ||
| ANDROID_DEFAULT_DEVICE: ${{ matrix.device }} | ||
| IOS_DEFAULT_DEVICE: ${{ matrix.device }} | ||
| TEST_TUI: false | ||
| run: | | ||
| if [ "${{ matrix.platform }}" = "android" ]; then | ||
| # Use wrapper script for platform-specific optimization | ||
| bash tests/run-android-tests.sh | ||
| elif [ "${{ matrix.platform }}" = "ios" ]; then | ||
| # Use wrapper script for platform-specific optimization | ||
| bash tests/run-ios-tests.sh | ||
| elif [ "${{ matrix.platform }}" = "web" ]; then | ||
| bash tests/run-web-tests.sh | ||
| fi | ||
| - name: Upload reports and logs | ||
| if: always() | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: react-native-${{ matrix.platform }}-${{ matrix.device }}-reports | ||
| path: | | ||
| examples/react-native/reports/ | ||
| examples/react-native/android/app/build/outputs/ | ||
| examples/react-native/ios/build/ | ||
| ~/Library/Logs/CoreSimulator/ | ||
| retention-days: 7 | ||
| # Summary status check | ||
| e2e-summary: | ||
| name: E2E Test Summary | ||
| runs-on: ubuntu-latest | ||
| needs: [android-e2e, ios-e2e, react-native-e2e] | ||
| if: always() | ||
| steps: | ||
| - name: Check results | ||
| run: | | ||
| echo "📊 E2E Test Results:" | ||
| echo " Android E2E: ${{ needs.android-e2e.result }}" | ||
| echo " iOS E2E: ${{ needs.ios-e2e.result }}" | ||
| echo " React Native E2E: ${{ needs.react-native-e2e.result }}" | ||
| echo "" | ||
| if [[ "${{ needs.android-e2e.result }}" != "success" && "${{ needs.android-e2e.result }}" != "skipped" ]] || \ | ||
| [[ "${{ needs.ios-e2e.result }}" != "success" && "${{ needs.ios-e2e.result }}" != "skipped" ]] || \ | ||
| [[ "${{ needs.react-native-e2e.result }}" != "success" && "${{ needs.react-native-e2e.result }}" != "skipped" ]]; then | ||
| echo "::error::One or more E2E test suites failed" | ||
| echo "::error::Check the individual job logs for details" | ||
| echo "::error::Logs available in artifacts" | ||
| exit 1 | ||
| fi | ||
| echo "::notice::✅ All E2E tests passed successfully!" | ||