wiki & cleanup #4
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: PR Fast Checks | |
| on: | |
| pull_request: | |
| branches: [main] | |
| push: | |
| branches: [main] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| # Fast test suite (lint + unit + integration) | |
| fast-tests: | |
| name: Fast Tests (Lint + Unit + Integration) | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 20 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Devbox | |
| uses: jetify-com/devbox-install-action@v0.14.0 | |
| with: | |
| enable-cache: true | |
| - name: Run fast test suite | |
| run: devbox run test:fast | |
| - name: Upload reports and logs | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: fast-test-reports | |
| path: | | |
| test-results/ | |
| reports/ | |
| retention-days: 7 | |
| # Android example E2E tests (min/max devices) | |
| android-e2e: | |
| name: Android E2E - ${{ matrix.device }} | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 30 | |
| needs: fast-tests | |
| 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: 180 | |
| TEST_TIMEOUT: 300 | |
| 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 }} | |
| runs-on: ${{ matrix.os }} | |
| timeout-minutes: 25 | |
| needs: fast-tests | |
| 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: 120 | |
| TEST_TIMEOUT: 300 | |
| 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 }} | |
| runs-on: ${{ matrix.os }} | |
| timeout-minutes: 45 | |
| needs: fast-tests | |
| 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: 240 | |
| TEST_TIMEOUT: 600 | |
| 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 | |
| devbox run test:e2e:web | |
| 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 | |
| status-check: | |
| name: All PR Checks Passed | |
| runs-on: ubuntu-latest | |
| needs: [fast-tests, android-e2e, ios-e2e, react-native-e2e] | |
| if: always() | |
| steps: | |
| - name: Check job results | |
| run: | | |
| echo "📊 PR Check Results:" | |
| echo " Fast Tests: ${{ needs.fast-tests.result }}" | |
| 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.fast-tests.result }}" != "success" ]] || \ | |
| [[ "${{ needs.android-e2e.result }}" != "success" ]] || \ | |
| [[ "${{ needs.ios-e2e.result }}" != "success" ]] || \ | |
| [[ "${{ needs.react-native-e2e.result }}" != "success" ]]; then | |
| echo "::error::One or more PR checks failed" | |
| exit 1 | |
| fi | |
| echo "::notice::✅ All PR checks passed!" |