|
4 | 4 | pull_request: |
5 | 5 | branches: |
6 | 6 | - '**' |
| 7 | + paths: |
| 8 | + - '.github/workflows/e2e_ios.yml' |
| 9 | + - '.gitmodules' |
| 10 | + - 'package.json' |
| 11 | + - 'bun.lock' |
| 12 | + - 'react-native-update.podspec' |
| 13 | + - 'react-native.config.js' |
| 14 | + - 'expo-module.config.json' |
| 15 | + - 'src/**' |
| 16 | + - 'scripts/**' |
| 17 | + - 'ios/**' |
| 18 | + - 'cpp/**' |
| 19 | + - 'android/jni/**' |
| 20 | + - 'Example/e2etest/package.json' |
| 21 | + - 'Example/e2etest/bun.lock' |
| 22 | + - 'Example/e2etest/app.json' |
| 23 | + - 'Example/e2etest/update.json' |
| 24 | + - 'Example/e2etest/.detoxrc.js' |
| 25 | + - 'Example/e2etest/.detoxrc.ts' |
| 26 | + - 'Example/e2etest/babel.config.js' |
| 27 | + - 'Example/e2etest/metro.config.js' |
| 28 | + - 'Example/e2etest/index.js' |
| 29 | + - 'Example/e2etest/tsconfig*.json' |
| 30 | + - 'Example/e2etest/src/**' |
| 31 | + - 'Example/e2etest/e2e/**' |
| 32 | + - 'Example/e2etest/scripts/**' |
| 33 | + - 'Example/e2etest/ios/**' |
7 | 34 | push: |
8 | 35 | branches: |
9 | 36 | - master |
| 37 | + paths: |
| 38 | + - '.github/workflows/e2e_ios.yml' |
| 39 | + - '.gitmodules' |
| 40 | + - 'package.json' |
| 41 | + - 'bun.lock' |
| 42 | + - 'react-native-update.podspec' |
| 43 | + - 'react-native.config.js' |
| 44 | + - 'expo-module.config.json' |
| 45 | + - 'src/**' |
| 46 | + - 'scripts/**' |
| 47 | + - 'ios/**' |
| 48 | + - 'cpp/**' |
| 49 | + - 'android/jni/**' |
| 50 | + - 'Example/e2etest/package.json' |
| 51 | + - 'Example/e2etest/bun.lock' |
| 52 | + - 'Example/e2etest/app.json' |
| 53 | + - 'Example/e2etest/update.json' |
| 54 | + - 'Example/e2etest/.detoxrc.js' |
| 55 | + - 'Example/e2etest/.detoxrc.ts' |
| 56 | + - 'Example/e2etest/babel.config.js' |
| 57 | + - 'Example/e2etest/metro.config.js' |
| 58 | + - 'Example/e2etest/index.js' |
| 59 | + - 'Example/e2etest/tsconfig*.json' |
| 60 | + - 'Example/e2etest/src/**' |
| 61 | + - 'Example/e2etest/e2e/**' |
| 62 | + - 'Example/e2etest/scripts/**' |
| 63 | + - 'Example/e2etest/ios/**' |
10 | 64 |
|
11 | 65 | concurrency: |
12 | 66 | group: ${{ github.workflow }}-${{ github.ref }} |
@@ -38,11 +92,13 @@ jobs: |
38 | 92 | with: |
39 | 93 | bun-version: latest |
40 | 94 |
|
41 | | - - name: Setup Java |
42 | | - uses: actions/setup-java@v5 |
| 95 | + - name: Cache Bun dependencies |
| 96 | + uses: actions/cache@v4 |
43 | 97 | with: |
44 | | - distribution: temurin |
45 | | - java-version: '17' |
| 98 | + path: ~/.bun/install/cache |
| 99 | + key: ${{ runner.os }}-bun-e2e-${{ hashFiles('Example/e2etest/bun.lock', 'react-native-update-cli/bun.lock') }} |
| 100 | + restore-keys: | |
| 101 | + ${{ runner.os }}-bun-e2e- |
46 | 102 |
|
47 | 103 | - name: Setup Xcode |
48 | 104 | uses: maxim-lobanov/setup-xcode@v1 |
@@ -70,14 +126,37 @@ jobs: |
70 | 126 | - name: Install react-native-update-cli dependencies |
71 | 127 | run: cd react-native-update-cli && bun install --frozen-lockfile && bun run build |
72 | 128 |
|
| 129 | + - name: Prepare local update artifacts |
| 130 | + env: |
| 131 | + E2E_PLATFORM: ios |
| 132 | + RNU_CLI_ROOT: ${{ github.workspace }}/react-native-update-cli |
| 133 | + run: cd Example/e2etest && bun run prepare:e2e |
| 134 | + |
| 135 | + - name: Cache CocoaPods dependencies |
| 136 | + uses: actions/cache@v4 |
| 137 | + with: |
| 138 | + path: | |
| 139 | + Example/e2etest/ios/Pods |
| 140 | + ~/Library/Caches/CocoaPods |
| 141 | + key: ${{ runner.os }}-cocoapods-e2e-${{ hashFiles('Example/e2etest/ios/Podfile.lock', 'Example/e2etest/ios/Podfile', 'Example/e2etest/bun.lock') }} |
| 142 | + restore-keys: | |
| 143 | + ${{ runner.os }}-cocoapods-e2e- |
| 144 | +
|
73 | 145 | - name: Install CocoaPods dependencies |
74 | 146 | run: cd Example/e2etest/ios && pod install |
75 | 147 |
|
76 | | - - name: Rebuild Detox iOS framework cache |
77 | | - run: | |
78 | | - cd Example/e2etest |
79 | | - bunx detox clean-framework-cache |
80 | | - bunx detox build-framework-cache |
| 148 | + - name: Cache Detox iOS framework |
| 149 | + id: cache-detox-ios-framework |
| 150 | + uses: actions/cache@v4 |
| 151 | + with: |
| 152 | + path: ~/Library/Detox |
| 153 | + key: ${{ runner.os }}-detox-ios-framework-xcode-26.4-${{ hashFiles('Example/e2etest/bun.lock') }} |
| 154 | + restore-keys: | |
| 155 | + ${{ runner.os }}-detox-ios-framework-xcode-26.4- |
| 156 | +
|
| 157 | + - name: Build Detox iOS framework cache |
| 158 | + if: steps.cache-detox-ios-framework.outputs.cache-hit != 'true' |
| 159 | + run: cd Example/e2etest && bunx detox build-framework-cache |
81 | 160 |
|
82 | 161 | - name: Detox build (ios.sim.release) |
83 | 162 | env: |
|
87 | 166 | - name: Detox test (ios.sim.release) |
88 | 167 | env: |
89 | 168 | RNU_CLI_ROOT: ${{ github.workspace }}/react-native-update-cli |
| 169 | + RNU_E2E_SKIP_PREPARE: 'true' |
90 | 170 | run: cd Example/e2etest && E2E_PLATFORM=ios bunx detox test --configuration ios.sim.release |
0 commit comments