6
6
7
7
8
8
commands :
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 >>
9
20
install_pods :
10
21
parameters :
11
22
working_directory :
30
41
name : node/default
31
42
steps :
32
43
- advanced-checkout/shallow-checkout
33
- - node/install-packages :
34
- pkg-manager : yarn
44
+ - install_node_modules
45
+ - attach_workspace :
46
+ at : coverage
35
47
- run :
36
48
name : Run Danger
37
49
command : yarn danger ci
41
53
name : node/default
42
54
steps :
43
55
- advanced-checkout/shallow-checkout
44
- - node/install-packages :
45
- pkg-manager : yarn
56
+ - install_node_modules
46
57
- run :
47
58
name : Check Format
48
59
command : yarn format
@@ -55,11 +66,14 @@ jobs:
55
66
name : node/default
56
67
steps :
57
68
- advanced-checkout/shallow-checkout
58
- - node/install-packages :
59
- pkg-manager : yarn
69
+ - install_node_modules
60
70
- run :
61
71
name : Run Tests
62
72
command : yarn test
73
+ - persist_to_workspace :
74
+ root : coverage
75
+ paths :
76
+ - lcov.info
63
77
64
78
test_android :
65
79
executor :
@@ -69,11 +83,14 @@ jobs:
69
83
steps :
70
84
- advanced-checkout/shallow-checkout
71
85
- node/install-yarn
72
- - node/install-packages :
73
- pkg-manager : yarn
86
+ - install_node_modules
74
87
- android/run-tests :
75
88
working-directory : android
76
89
test-command : ./gradlew test -PinstabugUploadEnable=false
90
+ - persist_to_workspace :
91
+ root : ~/project/android/build/reports/jacoco/jacocoTestReport
92
+ paths :
93
+ - jacocoTestReport.xml
77
94
78
95
validate_shell_files :
79
96
machine :
95
112
xcode : 13.4.1
96
113
steps :
97
114
- advanced-checkout/shallow-checkout
98
- - node/install-packages :
99
- pkg-manager : yarn
115
+ - install_node_modules
100
116
- node/install-packages :
101
117
pkg-manager : yarn
102
118
app-dir : examples/default
@@ -113,8 +129,7 @@ jobs:
113
129
INSTABUG_SOURCEMAPS_UPLOAD_DISABLE : true
114
130
steps :
115
131
- advanced-checkout/shallow-checkout
116
- - node/install-packages :
117
- pkg-manager : yarn
132
+ - install_node_modules
118
133
- install_pods :
119
134
working_directory : ios
120
135
- run :
@@ -131,14 +146,11 @@ jobs:
131
146
- run :
132
147
name : Convert xcresult into JSON report
133
148
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 [email protected] :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
142
154
143
155
e2e_ios :
144
156
macos :
@@ -148,8 +160,7 @@ jobs:
148
160
INSTABUG_SOURCEMAPS_UPLOAD_DISABLE : true
149
161
steps :
150
162
- advanced-checkout/shallow-checkout
151
- - node/install-packages :
152
- pkg-manager : yarn
163
+ - install_node_modules
153
164
- node/install-packages :
154
165
pkg-manager : yarn
155
166
app-dir : examples/default
@@ -182,8 +193,7 @@ jobs:
182
193
steps :
183
194
- advanced-checkout/shallow-checkout
184
195
- node/install-yarn
185
- - node/install-packages :
186
- pkg-manager : yarn
196
+ - install_node_modules
187
197
- node/install-packages :
188
198
pkg-manager : yarn
189
199
app-dir : examples/default
@@ -220,8 +230,7 @@ jobs:
220
230
- run :
221
231
working_directory : Escape/.build/release
222
232
command : cp -f Escape /usr/local/bin/escape
223
- - node/install-packages :
224
- pkg-manager : yarn
233
+ - install_node_modules :
225
234
app-dir : project
226
235
- run :
227
236
working_directory : project
@@ -233,7 +242,11 @@ jobs:
233
242
workflows :
234
243
publish :
235
244
jobs :
236
- - danger
245
+ - danger :
246
+ requires :
247
+ - test_module
248
+ - test_android
249
+ - test_ios
237
250
- lint
238
251
- test_module
239
252
- test_android
0 commit comments