1010 name : Run e2e iOS test
1111 runs-on : macOS-latest
1212 timeout-minutes : 30
13- defaults :
14- run :
15- working-directory : example
1613
1714 steps :
1815 - name : Check out Git repository
@@ -23,39 +20,58 @@ jobs:
2320 with :
2421 node-version : 14
2522
26- - name : Cache node modules
23+ - name : Cache lib node modules
2724 uses : actions/cache@v3
28- id : npmcache
25+ id : lib- npmcache
2926 with :
3027 path : node_modules
3128 key : node-modules-${{ hashFiles('**/yarn.lock') }}
3229
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+
3344 - name : Rebuild detox
34- if : steps.npmcache.outputs.cache-hit == 'true'
45+ if : steps.app-npmcache.outputs.cache-hit == 'true'
46+ working-directory : example
3547 run : yarn detox clean-framework-cache && yarn detox build-framework-cache
3648
37- - name : Install Dependencies
38- if : steps.npmcache.outputs.cache-hit != 'true'
49+ - name : Install app dependencies
50+ if : steps.app-npmcache.outputs.cache-hit != 'true'
51+ working-directory : example
3952 run : yarn install
4053
4154 - name : Cache Pods
4255 uses : actions/cache@v3
4356 id : podcache
4457 with :
45- path : ios/Pods
58+ path : example/ ios/Pods
4659 key : pods-${{ hashFiles('**/Podfile.lock') }}
4760
48- - name : Update Pods
61+ - name : Update pods and rn-nodify
4962 if : steps.podcache.outputs.cache-hit != 'true'
63+ working-directory : example
5064 run : |
5165 gem update cocoapods xcodeproj
52- yarn ios:pods
66+ yarn rn-setup
5367
5468 - name : Install brew dependencies
5569 run : brew tap wix/brew && brew install applesimutils
5670
5771 - name : Build iOS app
72+ working-directory : example
5873 run : yarn e2e:ios-build
5974
6075 - name : Test iOS app
76+ working-directory : example
6177 run : sh ../.github/scripts/test-ios.sh
0 commit comments