android e2e working #2
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: | |
| lint-and-validate: | |
| name: Lint & Workflow Validation | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 10 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Devbox | |
| uses: jetify-com/devbox-install-action@v0.14.0 | |
| with: | |
| enable-cache: true | |
| - name: Run orchestrated linting (shellcheck + workflow validation) | |
| run: devbox run test:lint | |
| - name: Upload logs | |
| if: failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: lint-logs | |
| path: test-results/devbox-lint-logs/ | |
| retention-days: 7 | |
| android-plugin-tests: | |
| name: Android Plugin Tests | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 15 | |
| needs: lint-and-validate | |
| 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 orchestrated Android plugin tests | |
| run: devbox run test:android | |
| - name: Upload logs | |
| if: failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: android-plugin-test-logs | |
| path: test-results/devbox-unit-tests-logs/test-android-* | |
| retention-days: 7 | |
| ios-plugin-tests: | |
| name: iOS Plugin Tests | |
| runs-on: macos-15 | |
| timeout-minutes: 15 | |
| needs: lint-and-validate | |
| 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 iOS 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 orchestrated iOS plugin tests | |
| run: devbox run test:ios | |
| - name: Upload logs | |
| if: failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ios-plugin-test-logs | |
| path: test-results/devbox-unit-tests-logs/test-ios-* | |
| retention-days: 7 | |
| android-quick-smoke: | |
| name: Android Quick Smoke Test (Orchestrated) | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 30 | |
| needs: android-plugin-tests | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Android CI | |
| uses: ./.github/actions/setup-android-ci | |
| with: | |
| device: min | |
| working-directory: examples/android | |
| - name: Install Devbox | |
| uses: jetify-com/devbox-install-action@v0.14.0 | |
| with: | |
| enable-cache: true | |
| - name: Run orchestrated Android E2E test | |
| working-directory: examples/android | |
| env: | |
| EMU_HEADLESS: 1 | |
| BOOT_TIMEOUT: 180 | |
| TEST_TIMEOUT: 300 | |
| ANDROID_DEFAULT_DEVICE: min | |
| TEST_TUI: false | |
| run: bash ../../tests/e2e-android-orchestrated.sh | |
| - name: Upload logs | |
| if: failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: android-smoke-logs | |
| path: | | |
| /tmp/android-e2e-logs/ | |
| examples/android/app/build/outputs/ | |
| retention-days: 7 | |
| ios-quick-smoke: | |
| name: iOS Quick Smoke Test (Orchestrated) | |
| runs-on: macos-15 | |
| timeout-minutes: 20 | |
| needs: ios-plugin-tests | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup iOS CI | |
| uses: ./.github/actions/setup-ios-ci | |
| - name: Install Devbox | |
| uses: jetify-com/devbox-install-action@v0.14.0 | |
| with: | |
| enable-cache: true | |
| - name: Run orchestrated iOS E2E test | |
| working-directory: examples/ios | |
| env: | |
| SIM_HEADLESS: 1 | |
| BOOT_TIMEOUT: 120 | |
| TEST_TIMEOUT: 300 | |
| TEST_TUI: false | |
| run: bash ../../tests/e2e-ios-orchestrated.sh | |
| - name: Upload logs | |
| if: failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ios-smoke-logs | |
| path: | | |
| /tmp/ios-e2e-logs/ | |
| ~/Library/Logs/CoreSimulator/ | |
| retention-days: 7 | |
| android-example-unit-tests: | |
| name: Android Example Unit Tests | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 15 | |
| needs: lint-and-validate | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - 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 example unit tests | |
| working-directory: examples/android | |
| run: devbox run --pure test:android | |
| ios-unit-tests: | |
| name: iOS Unit Tests | |
| runs-on: macos-15 | |
| timeout-minutes: 20 | |
| needs: lint-and-validate | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup iOS 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 unit tests | |
| working-directory: examples/ios | |
| run: devbox run --pure test:ios | |
| react-native-unit-tests: | |
| name: React Native Unit Tests | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 15 | |
| needs: lint-and-validate | |
| 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: Install Devbox | |
| uses: jetify-com/devbox-install-action@v0.14.0 | |
| with: | |
| enable-cache: true | |
| - name: Install dependencies | |
| working-directory: examples/react-native | |
| run: devbox run --pure build:node | |
| - name: Run Jest tests | |
| working-directory: examples/react-native | |
| run: npm test -- --coverage | |
| status-check: | |
| name: All PR Checks Passed | |
| runs-on: ubuntu-latest | |
| needs: [lint-and-validate, android-plugin-tests, ios-plugin-tests, android-quick-smoke, ios-quick-smoke, android-example-unit-tests, ios-unit-tests, react-native-unit-tests] | |
| if: always() | |
| steps: | |
| - name: Check job results | |
| run: | | |
| if [[ "${{ needs.lint-and-validate.result }}" != "success" ]] || \ | |
| [[ "${{ needs.android-plugin-tests.result }}" != "success" ]] || \ | |
| [[ "${{ needs.ios-plugin-tests.result }}" != "success" ]] || \ | |
| [[ "${{ needs.android-quick-smoke.result }}" != "success" ]] || \ | |
| [[ "${{ needs.ios-quick-smoke.result }}" != "success" ]] || \ | |
| [[ "${{ needs.android-example-unit-tests.result }}" != "success" ]] || \ | |
| [[ "${{ needs.ios-unit-tests.result }}" != "success" ]] || \ | |
| [[ "${{ needs.react-native-unit-tests.result }}" != "success" ]]; then | |
| echo "::error::One or more PR checks failed" | |
| exit 1 | |
| fi | |
| echo "::notice::All PR checks passed!" |