@@ -17,12 +17,6 @@ references:
17
17
- e2e_ios
18
18
- e2e_android
19
19
20
- dream11_prepare_config : &dream11_prepare_config
21
- prepare_steps :
22
- - prepare_dream11
23
- requires :
24
- - hold_test_dream11
25
-
26
20
commands :
27
21
install_node_modules :
28
22
parameters :
@@ -42,28 +36,15 @@ commands:
42
36
parameters :
43
37
working_directory :
44
38
type : string
45
- deployment :
46
- type : boolean
47
- default : false
48
39
steps :
49
40
- restore_cache :
50
41
name : Restore Pods Cache
51
42
keys :
52
43
- v1-pods-{{ checksum "<< parameters.working_directory >>/Podfile.lock" }}
53
- - when :
54
- condition : << parameters.deployment >>
55
- steps :
56
- - run :
57
- name : Install Pods
58
- working_directory : << parameters.working_directory >>
59
- command : pod install --deployment
60
- - unless :
61
- condition : << parameters.deployment >>
62
- steps :
63
- - run :
64
- name : Install Pods
65
- working_directory : << parameters.working_directory >>
66
- command : pod install
44
+ - run :
45
+ name : Install Pods
46
+ working_directory : << parameters.working_directory >>
47
+ command : pod install --deployment
67
48
- save_cache :
68
49
name : Save Pods Cache
69
50
key : v1-pods-{{ checksum "<< parameters.working_directory >>/Podfile.lock" }}
@@ -139,11 +120,6 @@ commands:
139
120
name : Remove unused features
140
121
command : ./scripts/dream-11-delete-unused-features.sh
141
122
working_directory : << parameters.working_directory >>
142
- # Remove the NDK package to avoid dependency conflicts on Android.
143
- - run :
144
- name : Remove the NDK package
145
- command : yarn remove instabug-reactnative-ndk
146
- working_directory : << parameters.working_directory >>/examples/default
147
123
148
124
notify_github :
149
125
parameters :
@@ -182,38 +158,20 @@ jobs:
182
158
command : yarn lint:ci
183
159
184
160
test_module :
185
- parameters :
186
- prepare_steps :
187
- type : steps
188
- default : []
189
- collect_coverage :
190
- type : boolean
191
- default : false
192
161
executor :
193
162
name : node/default
194
163
steps :
195
164
- advanced-checkout/shallow-checkout
196
- - steps : << parameters.prepare_steps >>
197
165
- install_node_modules
198
166
- run :
199
167
name : Run Tests
200
168
command : yarn test
201
- - when :
202
- condition : << parameters.collect_coverage >>
203
- steps :
204
- - persist_to_workspace :
205
- root : coverage
206
- paths :
207
- - lcov.info
169
+ - persist_to_workspace :
170
+ root : coverage
171
+ paths :
172
+ - lcov.info
208
173
209
174
test_android :
210
- parameters :
211
- prepare_steps :
212
- type : steps
213
- default : []
214
- collect_coverage :
215
- type : boolean
216
- default : false
217
175
executor :
218
176
name : android/android-machine
219
177
tag : ' 2024.01.1'
@@ -222,18 +180,15 @@ jobs:
222
180
INSTABUG_SOURCEMAPS_UPLOAD_DISABLE : true
223
181
steps :
224
182
- advanced-checkout/shallow-checkout
225
- - steps : << parameters.prepare_steps >>
183
+ # - node/install-yarn
226
184
- install_node_modules
227
185
- android/run-tests :
228
186
working-directory : android
229
187
test-command : ./gradlew test
230
- - when :
231
- condition : << parameters.collect_coverage >>
232
- steps :
233
- - persist_to_workspace :
234
- root : ~/project/android/build/reports/jacoco/jacocoTestReport
235
- paths :
236
- - jacocoTestReport.xml
188
+ - persist_to_workspace :
189
+ root : ~/project/android/build/reports/jacoco/jacocoTestReport
190
+ paths :
191
+ - jacocoTestReport.xml
237
192
238
193
validate_shell_files :
239
194
machine :
@@ -262,18 +217,10 @@ jobs:
262
217
app-dir : examples/default
263
218
- install_pods :
264
219
working_directory : examples/default/ios
265
- deployment : true
266
220
- run : git --no-pager diff
267
221
- run : git diff-index HEAD --exit-code -p -I EXCLUDED_ARCHS # Ignore Arch Changes
268
222
269
223
test_ios :
270
- parameters :
271
- prepare_steps :
272
- type : steps
273
- default : []
274
- collect_coverage :
275
- type : boolean
276
- default : false
277
224
macos :
278
225
xcode : 13.4.1
279
226
resource_class : macos.m1.medium.gen1
@@ -282,7 +229,6 @@ jobs:
282
229
INSTABUG_SOURCEMAPS_UPLOAD_DISABLE : true
283
230
steps :
284
231
- advanced-checkout/shallow-checkout
285
- - steps : << parameters.prepare_steps >>
286
232
- install_node_modules
287
233
- install_pods :
288
234
working_directory : ios
@@ -297,31 +243,23 @@ jobs:
297
243
-sdk iphonesimulator \
298
244
-destination 'platform=iOS Simulator,name=iPhone 13 Pro Max,OS=15.5' \
299
245
test | xcpretty
300
- - when :
301
- condition : << parameters.collect_coverage >>
302
- steps :
303
- - run :
304
- name : Convert xcresult into JSON report
305
- working_directory : ios/coverage
306
- command : xcrun xccov view --report --json result.xcresult > xcode.json
307
- - persist_to_workspace :
308
- root : ios/coverage
309
- paths :
310
- - xcode.json
246
+ - run :
247
+ name : Convert xcresult into JSON report
248
+ working_directory : ios/coverage
249
+ command : xcrun xccov view --report --json result.xcresult > xcode.json
250
+ - persist_to_workspace :
251
+ root : ios/coverage
252
+ paths :
253
+ - xcode.json
311
254
312
255
e2e_ios :
313
- parameters :
314
- prepare_steps :
315
- type : steps
316
- default : []
317
256
macos :
318
257
xcode : 13.4.1
319
258
resource_class : macos.m1.medium.gen1
320
259
environment :
321
260
INSTABUG_SOURCEMAPS_UPLOAD_DISABLE : true
322
261
steps :
323
262
- advanced-checkout/shallow-checkout
324
- - steps : << parameters.prepare_steps >>
325
263
- install_node_modules
326
264
- node/install-packages :
327
265
pkg-manager : yarn
@@ -338,11 +276,6 @@ jobs:
338
276
name : Rebuild Detox.framework Cache
339
277
working_directory : examples/default
340
278
command : detox clean-framework-cache && detox build-framework-cache
341
- # This is a workaround until the iOS SDK is updated to prioritize the custom
342
- # Instabug.plist over the internal Config.plist.
343
- - run :
344
- name : Customize API Endpoints
345
- command : ./scripts/customize-ios-endpoints.sh
346
279
- run :
347
280
name : Detox - Build Release App
348
281
working_directory : examples/default
@@ -353,10 +286,6 @@ jobs:
353
286
command : detox test --configuration ios.sim.release --cleanup
354
287
355
288
e2e_android :
356
- parameters :
357
- prepare_steps :
358
- type : steps
359
- default : []
360
289
executor :
361
290
name : android/android-machine
362
291
tag : ' 2024.01.1'
@@ -365,7 +294,7 @@ jobs:
365
294
INSTABUG_SOURCEMAPS_UPLOAD_DISABLE : true
366
295
steps :
367
296
- advanced-checkout/shallow-checkout
368
- - steps : << parameters.prepare_steps >>
297
+ # - node/install-yarn
369
298
- install_node_modules
370
299
- node/install-packages :
371
300
pkg-manager : yarn
@@ -469,22 +398,35 @@ jobs:
469
398
- run : yarn build
470
399
- run : yarn remove @instabug/danger-plugin-coverage
471
400
- run :
472
- name : Get snapshot version
401
+ name : Remove build files from .gitignore
402
+ command : sed -i '/dist/d' .gitignore && sed -i '/bin/d' .gitignore
403
+ - run :
404
+ name : Get snapshot branch name
473
405
command : |
474
- source scripts/snapshot-version .sh
475
- echo "export SNAPSHOT_VERSION=$SNAPSHOT_VERSION " >> "$BASH_ENV"
406
+ source scripts/snapshot-branch .sh
407
+ echo "export SNAPSHOT_BRANCH=$SNAPSHOT_BRANCH " >> "$BASH_ENV"
476
408
- run :
477
- name : Authorize with NPM
478
- command : echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc
479
- - run : npm version $SNAPSHOT_VERSION --no-git-tag-version
480
- - run : npm publish --tag snapshot
409
+ name : Setup Git
410
+ command : |
411
+ git config --global user.name "Instabug-CP-CI"
412
+ git config --global user.email [email protected]
413
+ - run :
414
+ name : Create snapshot branch
415
+ command : git checkout -b $SNAPSHOT_BRANCH
416
+ - run :
417
+ name : Commit changes
418
+ command : |
419
+ git add .
420
+ git commit -m "chore: add generate files"
421
+ - run :
422
+ name : Push snapshot
423
+ command : git push --force origin $SNAPSHOT_BRANCH
481
424
- run :
482
425
name : Install jq
483
426
command : sudo apt-get update && sudo apt-get install -y jq
484
- - find_and_replace :
485
- files : scripts/snapshot-comment.md
486
- search : ' {VERSION}'
487
- replace : $SNAPSHOT_VERSION
427
+ - run :
428
+ name : Replace snapshot branch in comment template
429
+ command : sed -i "s|{BRANCH}|$SNAPSHOT_BRANCH|g" scripts/snapshot-comment.md
488
430
- notify_github :
489
431
data : " $(jq -Rcs '{ body: . }' scripts/snapshot-comment.md)"
490
432
@@ -497,14 +439,11 @@ workflows:
497
439
- test_android
498
440
- test_ios
499
441
- lint
500
- - test_module :
501
- collect_coverage : true
502
- - test_android :
503
- collect_coverage : true
504
- - test_ios :
505
- collect_coverage : true
442
+ - test_module
443
+ - test_android
506
444
- validate_shell_files
507
445
- sync_generated_files
446
+ - test_ios
508
447
- e2e_ios
509
448
- e2e_android
510
449
- hold_generate_snapshot :
@@ -576,33 +515,8 @@ workflows:
576
515
android_package : injazat
577
516
api_endpoint : st001013mec1.instabug.com
578
517
579
- # Dream11 tests
580
- - hold_test_dream11 :
581
- type : approval
582
- - test_module :
583
- name : test_module_dream11
584
- << : *dream11_prepare_config
585
- - test_android :
586
- name : test_android_dream11
587
- << : *dream11_prepare_config
588
- - test_ios :
589
- name : test_ios_dream11
590
- << : *dream11_prepare_config
591
- - e2e_android :
592
- name : e2e_android_dream11
593
- << : *dream11_prepare_config
594
- - e2e_ios :
595
- name : e2e_ios_dream11
596
- << : *dream11_prepare_config
597
-
598
- # Dream11 release
599
518
- hold_release_dream11 :
600
- requires :
601
- - test_module_dream11
602
- - test_android_dream11
603
- - test_ios_dream11
604
- - e2e_android_dream11
605
- - e2e_ios_dream11
519
+ requires : *release_dependencies
606
520
type : approval
607
521
filters :
608
522
branches :
0 commit comments