|
| 1 | +name: e2e-ios |
| 2 | + |
| 3 | +on: |
| 4 | + pull_request: |
| 5 | + branches: |
| 6 | + - 'master' |
| 7 | + |
| 8 | +jobs: |
| 9 | + e2e-test: |
| 10 | + name: E2E iOS test |
| 11 | + runs-on: macOS-latest |
| 12 | + timeout-minutes: 35 |
| 13 | + |
| 14 | + steps: |
| 15 | + - name: Check out Git repository |
| 16 | + uses: actions/checkout@v2 |
| 17 | + |
| 18 | + - name: Set up Node.js |
| 19 | + uses: actions/setup-node@v1 |
| 20 | + with: |
| 21 | + node-version: 14 |
| 22 | + |
| 23 | + - name: Cache lib node modules |
| 24 | + uses: actions/cache@v3 |
| 25 | + id: lib-npmcache |
| 26 | + with: |
| 27 | + path: node_modules |
| 28 | + key: node-modules-${{ hashFiles('**/yarn.lock') }} |
| 29 | + |
| 30 | + - name: Install lib dependencies |
| 31 | + if: steps.lib-npmcache.outputs.cache-hit != 'true' |
| 32 | + run: yarn install |
| 33 | + |
| 34 | + - name: Build lib |
| 35 | + run: yarn build |
| 36 | + |
| 37 | + - name: Cache app node modules |
| 38 | + uses: actions/cache@v3 |
| 39 | + id: app-npmcache |
| 40 | + with: |
| 41 | + path: example/node_modules |
| 42 | + key: node-modules-${{ hashFiles('**/yarn.lock') }} |
| 43 | + |
| 44 | + - name: Rebuild detox |
| 45 | + if: steps.app-npmcache.outputs.cache-hit == 'true' |
| 46 | + working-directory: example |
| 47 | + run: yarn detox clean-framework-cache && yarn detox build-framework-cache |
| 48 | + |
| 49 | + - name: Install app dependencies |
| 50 | + if: steps.app-npmcache.outputs.cache-hit != 'true' |
| 51 | + working-directory: example |
| 52 | + run: yarn install |
| 53 | + |
| 54 | + - name: Cache Pods |
| 55 | + uses: actions/cache@v3 |
| 56 | + id: podcache |
| 57 | + with: |
| 58 | + path: example/ios/Pods |
| 59 | + key: pods-${{ hashFiles('**/Podfile.lock') }} |
| 60 | + |
| 61 | + - name: Install pods and rn-nodify |
| 62 | + working-directory: example |
| 63 | + run: | |
| 64 | + gem update cocoapods xcodeproj |
| 65 | + yarn rn-setup |
| 66 | +
|
| 67 | + - name: Install brew dependencies |
| 68 | + run: brew tap wix/brew && brew install applesimutils |
| 69 | + |
| 70 | + - name: Build iOS app |
| 71 | + working-directory: example |
| 72 | + run: yarn e2e:ios-build |
| 73 | + |
| 74 | + - name: Test iOS app |
| 75 | + working-directory: example |
| 76 | + run: sh ../.github/scripts/test-ios.sh |
0 commit comments