66 node : circleci/node@5.1.0
77
88commands :
9+ install_node_modules :
10+ parameters :
11+ app-dir :
12+ type : string
13+ default : .
14+ steps :
15+ - node/install-packages :
16+ pkg-manager : yarn
17+ # Network concurrency is set to 1 for installation from GitHub to work.
18+ override-ci-command : yarn install --frozen-lockfile --network-concurrency 1
19+ app-dir : << parameters.app-dir >>
920 install_pods :
1021 parameters :
1122 working_directory :
3041 name : node/default
3142 steps :
3243 - advanced-checkout/shallow-checkout
33- - node/install-packages :
34- pkg-manager : yarn
44+ - install_node_modules
45+ - attach_workspace :
46+ at : coverage
3547 - run :
3648 name : Run Danger
3749 command : yarn danger ci
4153 name : node/default
4254 steps :
4355 - advanced-checkout/shallow-checkout
44- - node/install-packages :
45- pkg-manager : yarn
56+ - install_node_modules
4657 - run :
4758 name : Check Format
4859 command : yarn format
@@ -55,11 +66,14 @@ jobs:
5566 name : node/default
5667 steps :
5768 - advanced-checkout/shallow-checkout
58- - node/install-packages :
59- pkg-manager : yarn
69+ - install_node_modules
6070 - run :
6171 name : Run Tests
6272 command : yarn test
73+ - persist_to_workspace :
74+ root : coverage
75+ paths :
76+ - lcov.info
6377
6478 test_android :
6579 executor :
@@ -69,11 +83,14 @@ jobs:
6983 steps :
7084 - advanced-checkout/shallow-checkout
7185 - node/install-yarn
72- - node/install-packages :
73- pkg-manager : yarn
86+ - install_node_modules
7487 - android/run-tests :
7588 working-directory : android
7689 test-command : ./gradlew test -PinstabugUploadEnable=false
90+ - persist_to_workspace :
91+ root : ~/project/android/build/reports/jacoco/jacocoTestReport
92+ paths :
93+ - jacocoTestReport.xml
7794
7895 validate_shell_files :
7996 machine :
95112 xcode : 13.4.1
96113 steps :
97114 - advanced-checkout/shallow-checkout
98- - node/install-packages :
99- pkg-manager : yarn
115+ - install_node_modules
100116 - node/install-packages :
101117 pkg-manager : yarn
102118 app-dir : examples/default
@@ -113,8 +129,7 @@ jobs:
113129 INSTABUG_SOURCEMAPS_UPLOAD_DISABLE : true
114130 steps :
115131 - advanced-checkout/shallow-checkout
116- - node/install-packages :
117- pkg-manager : yarn
132+ - install_node_modules
118133 - install_pods :
119134 working_directory : ios
120135 - run :
@@ -131,14 +146,11 @@ jobs:
131146 - run :
132147 name : Convert xcresult into JSON report
133148 working_directory : ios/coverage
134- command : xcrun xccov view --report --json result.xcresult > report.json
135- - run :
136- name : Clone xccov2lcov
137- command : git clone git@github.com:trax-retail/xccov2lcov.git
138- - run :
139- name : Convert xccov into lcov report
140- working_directory : xccov2lcov
141- command : swift run xccov2lcov ../ios/coverage/report.json > ../ios/coverage/coverage.txt
149+ command : xcrun xccov view --report --json result.xcresult > xcode.json
150+ - persist_to_workspace :
151+ root : ios/coverage
152+ paths :
153+ - xcode.json
142154
143155 e2e_ios :
144156 macos :
@@ -148,8 +160,7 @@ jobs:
148160 INSTABUG_SOURCEMAPS_UPLOAD_DISABLE : true
149161 steps :
150162 - advanced-checkout/shallow-checkout
151- - node/install-packages :
152- pkg-manager : yarn
163+ - install_node_modules
153164 - node/install-packages :
154165 pkg-manager : yarn
155166 app-dir : examples/default
@@ -182,8 +193,7 @@ jobs:
182193 steps :
183194 - advanced-checkout/shallow-checkout
184195 - node/install-yarn
185- - node/install-packages :
186- pkg-manager : yarn
196+ - install_node_modules
187197 - node/install-packages :
188198 pkg-manager : yarn
189199 app-dir : examples/default
@@ -220,8 +230,7 @@ jobs:
220230 - run :
221231 working_directory : Escape/.build/release
222232 command : cp -f Escape /usr/local/bin/escape
223- - node/install-packages :
224- pkg-manager : yarn
233+ - install_node_modules :
225234 app-dir : project
226235 - run :
227236 working_directory : project
@@ -233,7 +242,11 @@ jobs:
233242workflows :
234243 publish :
235244 jobs :
236- - danger
245+ - danger :
246+ requires :
247+ - test_module
248+ - test_android
249+ - test_ios
237250 - lint
238251 - test_module
239252 - test_android
0 commit comments