|
| 1 | +name: E2E Mobile Tests |
| 2 | + |
| 3 | +on: |
| 4 | + # Weekly schedule - Monday 9am UTC |
| 5 | + schedule: |
| 6 | + - cron: '0 9 * * 1' |
| 7 | + |
| 8 | + # Manual trigger |
| 9 | + workflow_dispatch: |
| 10 | + inputs: |
| 11 | + test_matrix: |
| 12 | + description: 'Test matrix to run' |
| 13 | + required: false |
| 14 | + type: choice |
| 15 | + options: |
| 16 | + - all |
| 17 | + - android |
| 18 | + - ios |
| 19 | + - compat |
| 20 | + - latest |
| 21 | + default: 'all' |
| 22 | + |
| 23 | + # FOR TESTING: Remove before merge - trigger on push to feature branch |
| 24 | + push: |
| 25 | + branches: |
| 26 | + - feat/mobile-devtools-e2e-integration |
| 27 | + |
| 28 | + # Callable by other workflows (e.g., release) |
| 29 | + workflow_call: |
| 30 | + |
| 31 | +concurrency: |
| 32 | + group: e2e-mobile-${{ github.ref }} |
| 33 | + cancel-in-progress: true |
| 34 | + |
| 35 | +jobs: |
| 36 | + e2e-android-compat: |
| 37 | + name: E2E Android (RN 0.72) |
| 38 | + runs-on: ubuntu-latest |
| 39 | + timeout-minutes: 30 |
| 40 | + if: | |
| 41 | + inputs.test_matrix == 'all' || |
| 42 | + inputs.test_matrix == 'android' || |
| 43 | + inputs.test_matrix == 'compat' || |
| 44 | + github.event_name != 'workflow_dispatch' |
| 45 | + steps: |
| 46 | + - uses: actions/checkout@v4 |
| 47 | + |
| 48 | + - name: Install devbox |
| 49 | + uses: jetify-com/devbox-install-action@v0.14.0 |
| 50 | + with: |
| 51 | + project-path: examples/E2E-compat |
| 52 | + |
| 53 | + - name: Run Android E2E Tests |
| 54 | + working-directory: examples/E2E-compat |
| 55 | + run: devbox run test:e2e:android |
| 56 | + env: |
| 57 | + DETOX_AVD: medium_phone_API33_x86_64 |
| 58 | + |
| 59 | + - name: Upload test results |
| 60 | + if: always() |
| 61 | + uses: actions/upload-artifact@v4 |
| 62 | + with: |
| 63 | + name: e2e-android-compat-results |
| 64 | + path: examples/E2E-compat/reports/ |
| 65 | + if-no-files-found: ignore |
| 66 | + |
| 67 | + e2e-ios-compat: |
| 68 | + name: E2E iOS (RN 0.72) |
| 69 | + runs-on: macos-latest |
| 70 | + timeout-minutes: 30 |
| 71 | + if: | |
| 72 | + inputs.test_matrix == 'all' || |
| 73 | + inputs.test_matrix == 'ios' || |
| 74 | + inputs.test_matrix == 'compat' || |
| 75 | + github.event_name != 'workflow_dispatch' |
| 76 | + steps: |
| 77 | + - uses: actions/checkout@v4 |
| 78 | + |
| 79 | + - name: Install devbox |
| 80 | + uses: jetify-com/devbox-install-action@v0.14.0 |
| 81 | + with: |
| 82 | + project-path: examples/E2E-compat |
| 83 | + |
| 84 | + - name: Run iOS E2E Tests |
| 85 | + working-directory: examples/E2E-compat |
| 86 | + run: devbox run test:e2e:ios |
| 87 | + |
| 88 | + - name: Upload test results |
| 89 | + if: always() |
| 90 | + uses: actions/upload-artifact@v4 |
| 91 | + with: |
| 92 | + name: e2e-ios-compat-results |
| 93 | + path: examples/E2E-compat/reports/ |
| 94 | + if-no-files-found: ignore |
| 95 | + |
| 96 | + e2e-android-latest: |
| 97 | + name: E2E Android (RN 0.84) |
| 98 | + runs-on: ubuntu-latest |
| 99 | + timeout-minutes: 30 |
| 100 | + if: | |
| 101 | + inputs.test_matrix == 'all' || |
| 102 | + inputs.test_matrix == 'android' || |
| 103 | + inputs.test_matrix == 'latest' || |
| 104 | + github.event_name != 'workflow_dispatch' |
| 105 | + steps: |
| 106 | + - uses: actions/checkout@v4 |
| 107 | + |
| 108 | + - name: Install devbox |
| 109 | + uses: jetify-com/devbox-install-action@v0.14.0 |
| 110 | + with: |
| 111 | + project-path: examples/E2E-latest |
| 112 | + |
| 113 | + - name: Run Android E2E Tests |
| 114 | + working-directory: examples/E2E-latest |
| 115 | + run: devbox run test:e2e:android |
| 116 | + env: |
| 117 | + DETOX_AVD: medium_phone_API35_x86_64 |
| 118 | + |
| 119 | + - name: Upload test results |
| 120 | + if: always() |
| 121 | + uses: actions/upload-artifact@v4 |
| 122 | + with: |
| 123 | + name: e2e-android-latest-results |
| 124 | + path: examples/E2E-latest/reports/ |
| 125 | + if-no-files-found: ignore |
| 126 | + |
| 127 | + e2e-ios-latest: |
| 128 | + name: E2E iOS (RN 0.84) |
| 129 | + runs-on: macos-latest |
| 130 | + timeout-minutes: 30 |
| 131 | + if: | |
| 132 | + inputs.test_matrix == 'all' || |
| 133 | + inputs.test_matrix == 'ios' || |
| 134 | + inputs.test_matrix == 'latest' || |
| 135 | + github.event_name != 'workflow_dispatch' |
| 136 | + steps: |
| 137 | + - uses: actions/checkout@v4 |
| 138 | + |
| 139 | + - name: Install devbox |
| 140 | + uses: jetify-com/devbox-install-action@v0.14.0 |
| 141 | + with: |
| 142 | + project-path: examples/E2E-latest |
| 143 | + |
| 144 | + - name: Run iOS E2E Tests |
| 145 | + working-directory: examples/E2E-latest |
| 146 | + run: devbox run test:e2e:ios |
| 147 | + |
| 148 | + - name: Upload test results |
| 149 | + if: always() |
| 150 | + uses: actions/upload-artifact@v4 |
| 151 | + with: |
| 152 | + name: e2e-ios-latest-results |
| 153 | + path: examples/E2E-latest/reports/ |
| 154 | + if-no-files-found: ignore |
0 commit comments