Devbox & CI Fixes #43
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
| name: E2E (On-Demand) | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| platforms: | |
| description: "Platforms to run (android, ios, all)" | |
| required: false | |
| default: "all" | |
| pull_request: | |
| branches: [master, beta] | |
| types: [opened, synchronize, reopened, labeled] | |
| paths-ignore: | |
| - 'docs/**' | |
| - 'wiki/**' | |
| - '**/*.md' | |
| concurrency: | |
| group: e2e-optional-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| run-e2e-ios: | |
| if: (github.event_name == 'workflow_dispatch' || contains(github.event.pull_request.labels.*.name, 'run-e2e') || github.event_name == 'push') && (github.event.inputs.platforms == 'all' || github.event.inputs.platforms == '' || github.event.inputs.platforms == 'ios' || github.event.inputs.platforms == null) | |
| runs-on: macos-26 | |
| env: | |
| YARN_ENABLE_HARDENED_MODE: 0 | |
| strategy: | |
| matrix: | |
| include: | |
| - name: ios-max | |
| ios-device: "iPhone 17" | |
| ios-runtime: "26.1" | |
| simulator-service: ios-simulator-max | |
| xcode-version: "26.1.1" | |
| env-dir: env/ios/max | |
| device-target: "ios-max" | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Resolve platform targets | |
| id: targets | |
| run: | | |
| eval "$(scripts/targets.sh profile ios-max)" | |
| { | |
| echo "IOS_RUNTIME=${IOS_RUNTIME}" | |
| echo "IOS_DEVICE_NAMES=${IOS_DEVICE_NAMES}" | |
| echo "DETOX_IOS_DEVICE=${DETOX_IOS_DEVICE}" | |
| echo "IOS_FLAVOR=${IOS_FLAVOR}" | |
| echo "IOS_TARGET=${IOS_TARGET}" | |
| } >> "$GITHUB_ENV" | |
| { | |
| echo "runtime=${IOS_RUNTIME}" | |
| echo "device=${IOS_DEVICE}" | |
| echo "flavor=${IOS_FLAVOR}" | |
| echo "target=${IOS_TARGET}" | |
| } >> "$GITHUB_OUTPUT" | |
| - name: Yarn cache (E2E) | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cache/yarn | |
| examples/E2E/.yarn/cache | |
| key: e2e-yarn-${{ runner.os }}-${{ hashFiles('examples/E2E/yarn.lock') }} | |
| restore-keys: | | |
| e2e-yarn-${{ runner.os }}- | |
| - name: CocoaPods cache (E2E) | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/Library/Caches/CocoaPods | |
| examples/E2E/ios/Pods | |
| key: e2e-pods-${{ runner.os }}-${{ hashFiles('examples/E2E/ios/Podfile.lock') }} | |
| restore-keys: | | |
| e2e-pods-${{ runner.os }}- | |
| - name: Aggressive disk cleanup (macOS) | |
| run: | | |
| sudo rm -rf /usr/share/dotnet | |
| sudo rm -rf /opt/ghc | |
| sudo rm -rf "$AGENT_TOOLSDIRECTORY" | |
| sudo rm -rf /Applications/Android\ Studio.app | |
| sudo rm -rf /usr/local/share/miniconda | |
| sudo rm -rf "$HOME/Library/Android" | |
| sudo rm -rf "$HOME/.gradle" | |
| sudo rm -rf "$HOME/Library/Developer/CoreSimulator/Devices" | |
| sudo rm -rf "$HOME/Library/Developer/Xcode/DerivedData" | |
| df -H | |
| - uses: maxim-lobanov/setup-xcode@v1 | |
| with: | |
| xcode-version: ${{ matrix.xcode-version }} | |
| - name: Install flox | |
| uses: flox/install-flox-action@v2.2.0 | |
| - name: Prepare iOS runtime (no boot) | |
| run: | | |
| flox activate -d "${{ matrix.env-dir }}" -- bash -lc 'IOS_DOWNLOAD_RUNTIME=1 bash scripts/devices.sh setup ios' | |
| - name: iOS E2E Build | |
| run: | | |
| flox activate -d "${{ matrix.env-dir }}" -- bash -lc "yarn --cwd examples/E2E build:ios" | |
| - name: iOS E2E Tests | |
| run: | | |
| flox activate -d "${{ matrix.env-dir }}" -- bash -lc "yarn --cwd examples/E2E test:ios" | |
| run-e2e-android: | |
| if: (github.event_name == 'workflow_dispatch' || contains(github.event.pull_request.labels.*.name, 'run-e2e') || github.event_name == 'push') && (github.event.inputs.platforms == 'all' || github.event.inputs.platforms == '' || github.event.inputs.platforms == 'android' || github.event.inputs.platforms == null) | |
| continue-on-error: true | |
| runs-on: ubuntu-24.04-arm | |
| strategy: | |
| matrix: | |
| include: | |
| - name: android-max | |
| emulator-service: android-emulator-max | |
| env-dir: env/android/max | |
| avd-flavor: "max" | |
| device-target: "android-max" | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Resolve platform targets | |
| id: android_targets | |
| run: | | |
| eval "$(scripts/targets.sh profile android-max)" | |
| { | |
| echo "ANDROID_API=${ANDROID_API}" | |
| echo "DETOX_AVD=${DETOX_AVD}" | |
| echo "AVD_FLAVOR=${AVD_FLAVOR}" | |
| echo "ANDROID_TARGET=${ANDROID_TARGET}" | |
| } >> "$GITHUB_ENV" | |
| { | |
| echo "api=${ANDROID_API}" | |
| echo "avd=${DETOX_AVD}" | |
| echo "flavor=${AVD_FLAVOR}" | |
| echo "target=${ANDROID_TARGET}" | |
| } >> "$GITHUB_OUTPUT" | |
| - name: Free Disk Space (Ubuntu) | |
| uses: jlumbroso/free-disk-space@v1.3.1 | |
| - name: Install flox | |
| uses: flox/install-flox-action@v2.2.0 | |
| - name: Prepare Android image (no boot) | |
| run: | | |
| flox activate -d "${{ matrix.env-dir }}" -- bash -lc 'AVD_FLAVOR=${{ matrix.avd-flavor }} bash scripts/devices.sh setup android' | |
| - name: Android E2E Build | |
| run: | | |
| flox activate -d "${{ matrix.env-dir }}" -- bash -lc "set -euo pipefail; AVD_FLAVOR=${{ matrix.avd-flavor }} yarn --cwd examples/E2E build:android" | |
| - name: Android E2E Tests | |
| run: | | |
| flox activate -d "${{ matrix.env-dir }}" -- bash -lc "set -euo pipefail; AVD_FLAVOR=${{ matrix.avd-flavor }} yarn --cwd examples/E2E test:android" |