fix(e2e): update install required packages step #20
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
| name: E2E Mobile Tests | |
| on: | |
| # Weekly schedule - Monday 9am UTC | |
| schedule: | |
| - cron: '0 9 * * 1' | |
| # TODO: Remove before merging - for testing only | |
| push: | |
| branches: | |
| - feat/mobile-devtools-e2e-integration | |
| # Manual trigger | |
| workflow_dispatch: | |
| inputs: | |
| test_matrix: | |
| description: 'Test matrix to run' | |
| required: false | |
| type: choice | |
| options: | |
| - all | |
| - android | |
| - ios | |
| - compat | |
| - latest | |
| default: 'all' | |
| # Callable by other workflows (e.g., release) | |
| workflow_call: | |
| concurrency: | |
| group: e2e-mobile-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| e2e-android-compat: | |
| name: E2E Android (RN 0.72) | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| if: | | |
| inputs.test_matrix == 'all' || | |
| inputs.test_matrix == 'android' || | |
| inputs.test_matrix == 'compat' || | |
| github.event_name != 'workflow_dispatch' | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install devbox | |
| uses: jetify-com/devbox-install-action@v0.14.0 | |
| with: | |
| project-path: examples/E2E-compat | |
| # Add these new steps to handle the read-only SDK issue | |
| - name: Find Android SDK path | |
| run: | | |
| SDK_PATH=$(find /nix/store -name "android-sdk" -type d | grep libexec | head -1) | |
| echo "ANDROID_SDK_PATH=$SDK_PATH" >> $GITHUB_ENV | |
| - name: Copy Android SDK to writable location | |
| run: | | |
| mkdir -p $HOME/android-sdk | |
| cp -r $ANDROID_SDK_PATH/* $HOME/android-sdk/ | |
| chmod -R 755 $HOME/android-sdk | |
| echo "ANDROID_SDK_ROOT=$HOME/android-sdk" >> $GITHUB_ENV | |
| echo "ANDROID_HOME=$HOME/android-sdk" >> $GITHUB_ENV | |
| - name: Install required Android SDK packages | |
| working-directory: examples/E2E-compat | |
| run: | | |
| devbox run --env ANDROID_SDK_ROOT=$HOME/android-sdk --env ANDROID_HOME=$HOME/android-sdk \ | |
| sdkmanager --sdk_root=$HOME/android-sdk "platform-tools" "platforms;android-35" "build-tools;30.0.3" | |
| yes | devbox run --env ANDROID_SDK_ROOT=$HOME/android-sdk --env ANDROID_HOME=$HOME/android-sdk \ | |
| sdkmanager --sdk_root=$HOME/android-sdk --licenses | |
| - name: Update local.properties for writable SDK | |
| run: | | |
| echo "sdk.dir=$HOME/android-sdk" > examples/E2E-compat/android/local.properties | |
| - name: Run Android E2E Tests | |
| working-directory: examples/E2E-compat | |
| run: devbox run --env ANDROID_SDK_ROOT=$HOME/android-sdk --env ANDROID_HOME=$HOME/android-sdk test:e2e:android | |
| env: | |
| DETOX_AVD: medium_phone_API33_x86_64 | |
| - name: Upload test results | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: e2e-android-compat-results | |
| path: examples/E2E-compat/reports/ | |
| if-no-files-found: ignore | |
| e2e-ios-compat: | |
| name: E2E iOS (RN 0.72) | |
| runs-on: macos-latest | |
| timeout-minutes: 30 | |
| if: | | |
| inputs.test_matrix == 'all' || | |
| inputs.test_matrix == 'ios' || | |
| inputs.test_matrix == 'compat' || | |
| github.event_name != 'workflow_dispatch' | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install devbox | |
| uses: jetify-com/devbox-install-action@v0.14.0 | |
| with: | |
| project-path: examples/E2E-compat | |
| - name: Run iOS E2E Tests | |
| working-directory: examples/E2E-compat | |
| run: devbox run --pure test:e2e:ios | |
| - name: Upload test results | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: e2e-ios-compat-results | |
| path: examples/E2E-compat/reports/ | |
| if-no-files-found: ignore | |
| e2e-android-latest: | |
| name: E2E Android (RN 0.84) | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| continue-on-error: true # TODO: Remove when RN 0.84 support is complete | |
| if: | | |
| inputs.test_matrix == 'all' || | |
| inputs.test_matrix == 'android' || | |
| inputs.test_matrix == 'latest' || | |
| github.event_name != 'workflow_dispatch' | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install devbox | |
| uses: jetify-com/devbox-install-action@v0.14.0 | |
| with: | |
| project-path: examples/E2E-latest | |
| # Add these new steps to handle the read-only SDK issue | |
| - name: Find Android SDK path | |
| run: | | |
| SDK_PATH=$(find /nix/store -name "android-sdk" -type d | grep libexec | head -1) | |
| echo "ANDROID_SDK_PATH=$SDK_PATH" >> $GITHUB_ENV | |
| - name: Copy Android SDK to writable location | |
| run: | | |
| mkdir -p $HOME/android-sdk | |
| cp -r $ANDROID_SDK_PATH/* $HOME/android-sdk/ | |
| chmod -R 755 $HOME/android-sdk | |
| echo "ANDROID_SDK_ROOT=$HOME/android-sdk" >> $GITHUB_ENV | |
| echo "ANDROID_HOME=$HOME/android-sdk" >> $GITHUB_ENV | |
| - name: Install required Android SDK packages | |
| working-directory: examples/E2E-latest | |
| run: | | |
| devbox run --env ANDROID_SDK_ROOT=$HOME/android-sdk --env ANDROID_HOME=$HOME/android-sdk \ | |
| sdkmanager --sdk_root=$HOME/android-sdk "platform-tools" "platforms;android-35" "build-tools;30.0.3" | |
| yes | devbox run --env ANDROID_SDK_ROOT=$HOME/android-sdk --env ANDROID_HOME=$HOME/android-sdk \ | |
| sdkmanager --sdk_root=$HOME/android-sdk --licenses | |
| - name: Update local.properties for writable SDK | |
| run: | | |
| echo "sdk.dir=$HOME/android-sdk" > examples/E2E-latest/android/local.properties | |
| - name: Run Android E2E Tests | |
| working-directory: examples/E2E-latest | |
| run: devbox run --env ANDROID_SDK_ROOT=$HOME/android-sdk --env ANDROID_HOME=$HOME/android-sdk test:e2e:android | |
| env: | |
| DETOX_AVD: medium_phone_API35_x86_64 | |
| - name: Upload test results | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: e2e-android-latest-results | |
| path: examples/E2E-latest/reports/ | |
| if-no-files-found: ignore | |
| e2e-ios-latest: | |
| name: E2E iOS (RN 0.84) | |
| runs-on: macos-latest | |
| timeout-minutes: 30 | |
| continue-on-error: true # TODO: Remove when RN 0.84 support is complete | |
| if: | | |
| inputs.test_matrix == 'all' || | |
| inputs.test_matrix == 'ios' || | |
| inputs.test_matrix == 'latest' || | |
| github.event_name != 'workflow_dispatch' | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install devbox | |
| uses: jetify-com/devbox-install-action@v0.14.0 | |
| with: | |
| project-path: examples/E2E-latest | |
| - name: Run iOS E2E Tests | |
| working-directory: examples/E2E-latest | |
| run: devbox run --pure test:e2e:ios | |
| - name: Upload test results | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: e2e-ios-latest-results | |
| path: examples/E2E-latest/reports/ | |
| if-no-files-found: ignore |