-
Notifications
You must be signed in to change notification settings - Fork 736
Expand file tree
/
Copy pathbitrise.yml
More file actions
752 lines (747 loc) · 26.8 KB
/
Copy pathbitrise.yml
File metadata and controls
752 lines (747 loc) · 26.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
---
format_version: '25'
default_step_lib_source: 'https://github.com/bitrise-io/bitrise-steplib.git'
project_type: android
trigger_map:
- push_branch: 'master'
pipeline: main-trigger-pipeline
- pull_request_source_branch: '*'
pipeline: main-trigger-pipeline
app:
envs:
- GRADLE_OPTS: -Dkotlin.incremental=false
# Run PaymentSheet E2E tests in parallel on one machine so Bitrise bills a single job.
- PAYMENTSHEET_E2E_DEVICE_SHARD_COUNT: 6
pipelines:
main-trigger-pipeline:
workflows:
check-and-test: { }
run-instrumentation-and-ime-tests: { }
run-paymentsheet-instrumentation-tests: { }
run-financial-connections-and-crypto-instrumentation-tests: { }
run-connections-e2e-tests-on-push: { }
run-cardscan-and-google-pay-tests: { }
run-paymentsheet-e2e: { }
check-dependencies-and-publish-pom: { }
pipeline-connect-e2e-debug-tests:
stages:
- stage-run-connect-e2e-tests: { }
# TODO: notify failure
pipeline-connections-e2e-debug-tests:
stages:
- stage-build-connections-debug: { }
- stage-run-connections-e2e-tests: { }
- stage-notify-connections-e2e-failure: { }
pipeline-connections-e2e-release-tests:
stages:
- stage-build-connections-release: { }
- stage-run-connections-e2e-tests: { }
- stage-notify-connections-e2e-failure: { }
stages:
stage-run-connect-e2e-tests:
workflows:
- run-connect-e2e-tests: { }
stage-build-connections-debug:
workflows:
- build-connections-debug: { }
stage-build-connections-release:
workflows:
- build-connections-release: { }
stage-run-connections-e2e-tests:
workflows:
- run-connections-e2e-payments-tests: { }
- run-connections-e2e-data-tests: { }
- run-connections-e2e-token-tests: { }
- run-connections-e2e-livemode-tests: { }
stage-notify-connections-e2e-failure:
should_always_run: true
workflows:
- notify-connections-e2e-failure: { }
workflows:
check-and-test:
envs:
- opts:
is_expand: false
NEEDS_ROBOLECTRIC: true
- INCLUDE_PAPARAZZI_ON_FAILURE: true
meta:
bitrise.io:
stack: osx-xcode-26.5.x # Specify Mac stack just for this workflow
machine_type_id: g2.mac.4large # Appropriate Mac instance
before_run:
- prepare_all
after_run:
- conclude_all
steps:
- script@1:
title: Run static analysis, unit, and screenshot tests
timeout: 1200
inputs:
- content: ./gradlew detekt lintRelease apiCheck verifyReleaseResources runUnitAndScreenshotTests :paymentsheet-example:testBaseDebugUnitTest --init-script build-configuration/unit-test-init.gradle --continue
- bundle::export_unit_test_results:
title: Export unit & screenshot test results
inputs:
- test_title: Unit & screenshot tests
build-connect-debug:
envs:
- BUILD_VARIANT: debug
before_run:
- _build-connect
_build-connect:
before_run:
- prepare_all
steps:
- android-build@1:
inputs:
- module: connect-example
- variant: $BUILD_VARIANT
- build_type: apk
- deploy-to-bitrise-io@2:
inputs:
- pipeline_intermediate_files: "$BITRISE_APK_PATH:BITRISE_APK_PATH"
build-connections-debug:
envs:
- BUILD_VARIANT: debug
before_run:
- _build-connections
build-connections-release:
envs:
- BUILD_VARIANT: release
before_run:
- _build-connections
_build-connections:
before_run:
- prepare_all
steps:
- android-build@1:
inputs:
- arguments: -PSTRIPE_FINANCIAL_CONNECTIONS_EXAMPLE_BACKEND_URL=$STRIPE_FINANCIAL_CONNECTIONS_EXAMPLE_BACKEND_URL
- module: financial-connections-example
- variant: $BUILD_VARIANT
- build_type: apk
- deploy-to-bitrise-io@2:
inputs:
- pipeline_intermediate_files: "$BITRISE_APK_PATH:BITRISE_APK_PATH"
run-connect-e2e-tests:
envs:
- MAESTRO_TAGS: all
before_run:
- _run-connect-e2e-tests
run-connections-e2e-payments-tests:
envs:
- MAESTRO_TAGS: testmode-payments
before_run:
- _run-connections-e2e-tests
meta:
bitrise.io:
stack: ubuntu-resolute-26.04-bitrise-2026-android
machine_type_id: g2.linux.x-large
run-connections-e2e-data-tests:
envs:
- MAESTRO_TAGS: testmode-data
before_run:
- _run-connections-e2e-tests
meta:
bitrise.io:
stack: ubuntu-resolute-26.04-bitrise-2026-android
machine_type_id: g2.linux.x-large
run-connections-e2e-token-tests:
envs:
- MAESTRO_TAGS: testmode-token
before_run:
- _run-connections-e2e-tests
meta:
bitrise.io:
stack: ubuntu-resolute-26.04-bitrise-2026-android
machine_type_id: g2.linux.x-large
run-connections-e2e-payments-tests-on-push:
envs:
- MAESTRO_TAGS: testmode-payments
- BUILD_VARIANT: release
before_run:
- _build-connections
- _run-connections-e2e-tests
meta:
bitrise.io:
stack: ubuntu-resolute-26.04-bitrise-2026-android
machine_type_id: g2.linux.x-large
run-connections-e2e-data-tests-on-push:
envs:
- MAESTRO_TAGS: testmode-data
- BUILD_VARIANT: release
before_run:
- _build-connections
- _run-connections-e2e-tests
meta:
bitrise.io:
stack: ubuntu-resolute-26.04-bitrise-2026-android
machine_type_id: g2.linux.x-large
run-connections-e2e-token-tests-on-push:
envs:
- MAESTRO_TAGS: testmode-token
- BUILD_VARIANT: release
before_run:
- _build-connections
- _run-connections-e2e-tests
meta:
bitrise.io:
stack: ubuntu-resolute-26.04-bitrise-2026-android
machine_type_id: g2.linux.x-large
run-connections-e2e-tests-on-push:
envs:
- MAESTRO_TAGS: testmode
- BUILD_VARIANT: release
before_run:
- start_connections_emulator
- prepare_all
after_run:
- conclude_all
steps:
# Build once and run all testmode flows on the same emulator. This avoids
# paying for three jobs that each repeat checkout, build, and emulator boot.
- android-build@1:
inputs:
- arguments: -PSTRIPE_FINANCIAL_CONNECTIONS_EXAMPLE_BACKEND_URL=$STRIPE_FINANCIAL_CONNECTIONS_EXAMPLE_BACKEND_URL
- module: financial-connections-example
- variant: $BUILD_VARIANT
- build_type: apk
- wait-for-android-emulator@1:
inputs:
- boot_timeout: 600
- script@1:
title: Start logcat capture
inputs:
- content: |-
#!/usr/bin/env bash
adb logcat > /tmp/logcat.txt 2>&1 &
echo $! > /tmp/logcat.pid
- script@1:
title: Execute all testmode Maestro tests
timeout: 1200
inputs:
- content: |-
#!/usr/bin/env bash
bash ./scripts/execute_maestro_tests.sh -m financial-connections -t $MAESTRO_TAGS
- script@1:
title: Stop logcat capture
is_always_run: true
is_skippable: true
inputs:
- content: |-
#!/usr/bin/env bash
kill "$(cat /tmp/logcat.pid)" 2>/dev/null || true
- deploy-to-bitrise-io@2:
title: Upload logcat on failure
run_if: '{{ getenv "BITRISE_BUILD_STATUS" | eq "1" }}'
inputs:
- deploy_path: /tmp/logcat.txt
- notify_user_groups: none
- is_enable_public_page: "false"
- script@1:
title: Test results
is_always_run: true
inputs:
- content: |-
#!/usr/bin/env bash
python3 "$BITRISE_SOURCE_DIR/scripts/merge_maestro_junit_reports.py" --tag "$MAESTRO_TAGS" --module financial-connections
meta:
bitrise.io:
stack: ubuntu-resolute-26.04-bitrise-2026-android
machine_type_id: g2.linux.x-large
run-connections-e2e-livemode-tests:
envs:
- MAESTRO_TAGS: livemode-data
before_run:
- _run-connections-e2e-tests
meta:
bitrise.io:
stack: ubuntu-resolute-26.04-bitrise-2026-android
machine_type_id: g2.linux.x-large
_run-connect-e2e-tests:
before_run:
- build-connect-debug
- start_connections_emulator
- prepare_all
after_run:
- conclude_all
steps:
- wait-for-android-emulator@1:
inputs:
- boot_timeout: 600
- pull-intermediate-files@1:
inputs:
- artifact_sources: .*
- script@1:
title: Execute Maestro tests
inputs:
- content: |-
#!/usr/bin/env bash
bash ./scripts/execute_maestro_tests.sh -m connect -t $MAESTRO_TAGS
- script@1:
title: Test results
is_always_run: true
inputs:
- content: |-
#!/usr/bin/env bash
python3 "$BITRISE_SOURCE_DIR/scripts/merge_maestro_junit_reports.py" --tag "$MAESTRO_TAGS" --module connect
_run-connections-e2e-tests:
before_run:
- start_connections_emulator
- prepare_all
after_run:
- conclude_all
steps:
- wait-for-android-emulator@1:
inputs:
- boot_timeout: 600
- pull-intermediate-files@1:
inputs:
- artifact_sources: .*
- script@1:
title: Start logcat capture
inputs:
- content: |-
#!/usr/bin/env bash
adb logcat > /tmp/logcat.txt 2>&1 &
echo $! > /tmp/logcat.pid
- script@1:
title: Execute Maestro tests
inputs:
- content: |-
#!/usr/bin/env bash
bash ./scripts/execute_maestro_tests.sh -m financial-connections -t $MAESTRO_TAGS
- script@1:
title: Stop logcat capture
is_always_run: true
is_skippable: true
inputs:
- content: |-
#!/usr/bin/env bash
kill "$(cat /tmp/logcat.pid)" 2>/dev/null || true
- deploy-to-bitrise-io@2:
title: Upload logcat on failure
run_if: '{{ getenv "BITRISE_BUILD_STATUS" | eq "1" }}'
inputs:
- deploy_path: /tmp/logcat.txt
- notify_user_groups: none
- is_enable_public_page: "false"
- script@1:
title: Test results
is_always_run: true
inputs:
- content: |-
#!/usr/bin/env bash
python3 "$BITRISE_SOURCE_DIR/scripts/merge_maestro_junit_reports.py" --tag "$MAESTRO_TAGS" --module financial-connections
notify-connections-e2e-failure:
steps:
# Notify all executions.
- slack@4:
inputs:
- webhook_url: $WEBHOOK_SLACK_CONNECTIONS_MOBILE
- webhook_url_on_error: $WEBHOOK_SLACK_CONNECTIONS_MOBILE
# Notify failures.
- slack@4:
run_if: '{{ getenv "BITRISEIO_PIPELINE_BUILD_STATUS" | eq "failed" }}'
inputs:
- webhook_url: $WEBHOOK_SLACK_CUX_BOTS
- webhook_url_on_error: $WEBHOOK_SLACK_CUX_BOTS
run-instrumentation-and-ime-tests:
before_run:
- prepare_all
after_run:
- conclude_all
steps:
- script@1:
title: Execute general instrumentation tests
timeout: 1200
inputs:
- content: ./scripts/retry_with_emulator_cleanup.sh 3 ./gradlew -Pandroid.experimental.androidTest.numManagedDeviceShards=1 pixel2api33DebugAndroidTest -x :paymentsheet-example:pixel2api33BaseDebugAndroidTest -x :paymentsheet:pixel2api33DebugAndroidTest -x :example:pixel2api33DebugAndroidTest -x :financial-connections:pixel2api33DebugAndroidTest -x :financial-connections-example:pixel2api33DebugAndroidTest -x :camera-core:pixel2api33DebugAndroidTest -x :crypto-onramp-example:pixel2api33DebugAndroidTest -x :stripecardscan:pixel2api33DebugAndroidTest -x :stripecardscan-example:pixel2api33DebugAndroidTest --init-script build-configuration/instrumentation-test-init.gradle
- script@1:
title: Execute PaymentSheet IME instrumentation tests
is_always_run: true
timeout: 1200
inputs:
- content: ./scripts/retry_with_emulator_cleanup.sh 3 ./gradlew -Pandroid.testInstrumentationRunnerArguments.annotation=com.stripe.android.paymentsheet.RequiresIme :paymentsheet:pixel2api33imeDebugAndroidTest --init-script build-configuration/instrumentation-test-init.gradle
- bundle::export_instrumentation_test_results:
title: Export general and IME instrumentation test results
is_always_run: true
inputs:
- test_title: General and IME instrumentation tests
run-paymentsheet-instrumentation-tests:
before_run:
- prepare_all
after_run:
- conclude_all
steps:
- script@1:
title: Execute instrumentation tests
timeout: 1200
inputs:
- content: ./scripts/retry_with_emulator_cleanup.sh 3 ./gradlew -Pandroid.experimental.androidTest.numManagedDeviceShards=6 -Pandroid.experimental.testOptions.managedDevices.maxConcurrentDevices=6 -Pandroid.testInstrumentationRunnerArguments.notAnnotation=com.stripe.android.paymentsheet.RequiresIme :paymentsheet:pixel2api33DebugAndroidTest --init-script build-configuration/instrumentation-test-init.gradle
- bundle::export_instrumentation_test_results:
title: Export PaymentSheet instrumentation test results
inputs:
- test_title: PaymentSheet instrumentation tests
meta:
bitrise.io:
stack: ubuntu-resolute-26.04-bitrise-2026-android
machine_type_id: g2.linux.x-large
run-paymentsheet-ime-instrumentation-tests:
before_run:
- prepare_all
after_run:
- conclude_all
steps:
- script@1:
title: Execute PaymentSheet IME instrumentation tests
timeout: 1200
inputs:
- content: ./scripts/retry_with_emulator_cleanup.sh 3 ./gradlew -Pandroid.testInstrumentationRunnerArguments.annotation=com.stripe.android.paymentsheet.RequiresIme :paymentsheet:pixel2api33imeDebugAndroidTest --init-script build-configuration/instrumentation-test-init.gradle
- bundle::export_instrumentation_test_results:
title: Export PaymentSheet IME instrumentation test results
inputs:
- test_title: PaymentSheet IME instrumentation tests
run-financial-connections-and-crypto-instrumentation-tests:
before_run:
- start_emulator
- prepare_all
after_run:
- conclude_all
steps:
- script@1:
title: Assemble Instrumentation tests
timeout: 600
inputs:
- content: ./gradlew :financial-connections:assembleAndroidTest :financial-connections-example:assembleAndroidTest :crypto-onramp-example:assembleDebug :crypto-onramp-example:assembleDebugAndroidTest
- wait-for-android-emulator@1:
inputs:
- boot_timeout: 600
- script@1:
title: Execute instrumentation tests
timeout: 1200
inputs:
- content: ./scripts/retry_with_emulator_cleanup.sh 3 ./gradlew :financial-connections:connectedAndroidTest :financial-connections-example:connectedAndroidTest :crypto-onramp-example:connectedDebugAndroidTest --init-script build-configuration/instrumentation-test-init.gradle --continue
- bundle::export_instrumentation_test_results:
title: Export FC and Crypto instrumentation test results
inputs:
- test_title: FC and Crypto instrumentation tests
meta:
bitrise.io:
stack: ubuntu-resolute-26.04-bitrise-2026-android
machine_type_id: g2.linux.x-large
run-cardscan-and-google-pay-tests:
before_run:
- start_cardscan_emulator
- prepare_all
after_run:
- conclude_all
steps:
- script@1:
title: Assemble Instrumentation tests
timeout: 600
inputs:
- content: ./gradlew :camera-core:assembleAndroidTest :stripecardscan:assembleAndroidTest :stripecardscan-example:assembleAndroidTest
- wait-for-android-emulator@1:
inputs:
- boot_timeout: 600
- script@1:
title: Execute instrumentation tests
timeout: 1200
inputs:
- content: ./scripts/retry_with_emulator_cleanup.sh 3 ./gradlew :camera-core:connectedAndroidTest :stripecardscan:connectedAndroidTest :stripecardscan-example:connectedAndroidTest --init-script build-configuration/instrumentation-test-init.gradle
- bundle::export_instrumentation_test_results:
title: Export CardScan instrumentation test results
inputs:
- test_title: CardScan instrumentation tests
# Firebase Test Lab runs remotely, so it can share this job without
# competing with CardScan's local emulator.
- android-build-for-ui-testing@0:
title: Build PaymentSheet Google Pay E2E test APKs
is_always_run: true
timeout: 1200
inputs:
- module: paymentsheet-example
- variant: baseDebug
- arguments: -PSTRIPE_PAYMENTSHEET_EXAMPLE_SENTRY_DSN=$STRIPE_PAYMENTSHEET_EXAMPLE_SENTRY_DSN
- virtual-device-testing-for-android@1:
title: Run TestGooglePay on virtual devices
is_always_run: true
timeout: 3600
inputs:
- test_type: instrumentation
- auto_google_login: "true"
- inst_test_targets: class com.stripe.android.lpm.TestGooglePay
- download_test_results: "true"
- test_timeout: "2700"
- deploy-to-bitrise-io@2:
title: Deploy Google Pay E2E test results
is_always_run: true
inputs:
- notify_user_groups: none
- is_enable_public_page: "false"
meta:
bitrise.io:
stack: ubuntu-resolute-26.04-bitrise-2026-android
machine_type_id: g2.linux.x-large
run-paymentsheet-e2e:
before_run:
- prepare_all
after_run:
- conclude_all
steps:
- script@1:
title: Execute PaymentSheet E2E tests
timeout: 2400
inputs:
- content: |-
#!/usr/bin/env bash
set -euo pipefail
# Keep the explicit class list so tests with dedicated workflows stay excluded.
CLASSES=$(python3 scripts/get_shard_test_classes.py --shard-index 0 --num-shards 1)
./scripts/retry_with_emulator_cleanup.sh 3 ./gradlew -PSTRIPE_PAYMENTSHEET_EXAMPLE_SENTRY_DSN=$STRIPE_PAYMENTSHEET_EXAMPLE_SENTRY_DSN -Pandroid.experimental.androidTest.numManagedDeviceShards=$PAYMENTSHEET_E2E_DEVICE_SHARD_COUNT -Pandroid.experimental.testOptions.managedDevices.maxConcurrentDevices=$PAYMENTSHEET_E2E_DEVICE_SHARD_COUNT "-Pandroid.testInstrumentationRunnerArguments.class=$CLASSES" :paymentsheet-example:pixel2api33chromeBaseDebugAndroidTest --init-script build-configuration/instrumentation-test-init.gradle
- bundle::export_instrumentation_test_results:
title: Export PaymentSheet E2E test results
inputs:
- test_title: PaymentSheet E2E tests
meta:
bitrise.io:
stack: ubuntu-resolute-26.04-bitrise-2026-android
machine_type_id: g2.linux.x-large
run-paymentsheet-google-pay-e2e:
before_run:
- prepare_all
after_run:
- conclude_all
steps:
- android-build-for-ui-testing@0:
title: Build PaymentSheet Google Pay E2E test APKs
timeout: 1200
inputs:
- module: paymentsheet-example
- variant: baseDebug
- arguments: -PSTRIPE_PAYMENTSHEET_EXAMPLE_SENTRY_DSN=$STRIPE_PAYMENTSHEET_EXAMPLE_SENTRY_DSN
- virtual-device-testing-for-android@1:
title: Run TestGooglePay on virtual devices
timeout: 3600
inputs:
- test_type: instrumentation
- auto_google_login: "true"
- inst_test_targets: class com.stripe.android.lpm.TestGooglePay
- download_test_results: "true"
- test_timeout: "2700"
- deploy-to-bitrise-io@2:
title: Deploy Google Pay E2E test results
inputs:
- notify_user_groups: none
- is_enable_public_page: "false"
meta:
bitrise.io:
stack: ubuntu-resolute-26.04-bitrise-2026-android
machine_type_id: g2.linux.x-large
run-paymentsheet-latency-synthetics:
before_run:
- start_emulator
- prepare_all
after_run:
- conclude_all
steps:
- script@1:
title: Install Ruby via asdf
inputs:
- content: asdf install ruby 3.2.4
- wait-for-android-emulator@1:
inputs:
- boot_timeout: 600
- script@1:
title: Report PaymentSheet latency synthetics
timeout: 2400
inputs:
- content: ruby scripts/report_latency_synthetics.rb
- bundle::export_instrumentation_test_results:
title: Export PaymentSheet latency test results
inputs:
- test_title: PaymentSheet latency synthetics
meta:
bitrise.io:
stack: ubuntu-resolute-26.04-bitrise-2026-android
machine_type_id: g2.linux.x-large
check-dependencies-and-publish-pom:
envs:
- INCLUDE_DEPENDENCIES_ON_FAILURE: true
before_run:
- prepare_all
after_run:
- conclude_all
steps:
- script@1:
inputs:
- content: asdf install ruby 3.2.4
- script@1:
title: Check dependencies and published POMs
timeout: 1200
inputs:
- content: |-
#!/usr/bin/env bash
set +e
ruby scripts/dependencies/update_transitive_dependencies.rb
dependencies_status=$?
if [ "$dependencies_status" -eq 0 ]; then
ruby scripts/dependencies/check_transitive_dependencies.rb
dependencies_status=$?
fi
bash ./scripts/verify_publish_pom.sh
publish_pom_status=$?
if [ "$dependencies_status" -ne 0 ] || [ "$publish_pom_status" -ne 0 ]; then
exit 1
fi
start_connections_emulator:
steps:
- avd-manager@2:
inputs:
- profile: "Nexus 5"
- abi: "x86_64"
- api_level: 33
- tag: "google_apis"
- start_command_flags: >
-camera-back none
-camera-front none
-netdelay none
-netspeed full
-memory 3072
-no-snapshot
-no-audio
-no-window
-gpu software
start_cardscan_emulator:
steps:
- avd-manager@2:
inputs:
- profile: "pixel_6"
- abi: "x86_64"
- api_level: 33
- tag: "google_apis_playstore"
- start_command_flags: >
-camera-back none
-camera-front none
-netdelay none
-netspeed full
-memory 4096
-no-snapshot
-no-audio
-no-window
start_emulator:
steps:
- avd-manager@2:
inputs:
- profile: "pixel_6"
- abi: "x86_64"
- api_level: 33
- tag: "google_apis"
- start_command_flags: >
-camera-back none
-camera-front none
-netdelay none
-netspeed full
-memory 4096
-no-snapshot
-no-audio
-no-window
start_screenshot_emulator:
steps:
- avd-manager@2:
inputs:
- profile: "Nexus 6"
- abi: "x86_64"
- api_level: 28
- start_command_flags: >
-camera-back none
-camera-front none
-netdelay none
-netspeed full
-memory 2048
-no-snapshot
-no-audio
-no-window
-no-snapshot-save
-gpu swiftshader_indirect
-no-boot-anim
prepare_all:
steps:
- activate-ssh-key@4:
run_if: '{{getenv "SSH_RSA_PRIVATE_KEY" | ne ""}}'
- git-clone@8: { }
- script@1:
title: Install Java via Direct Download
inputs:
- content: ./scripts/retry.sh 3 ./scripts/install_java.sh
- restore-gradle-configuration-cache@1: { }
- restore-gradle-cache@2: { }
- script@1:
inputs:
- content: mkdir -p ~/.gradle ; cp .bitrise/ci-gradle.properties ~/.gradle/gradle.properties
- script@1:
inputs:
- content: echo "STRIPE_EXAMPLE_BACKEND_URL=$STRIPE_EXAMPLE_BACKEND_URL" >> ~/.gradle/gradle.properties; echo "STRIPE_EXAMPLE_PUBLISHABLE_KEY=$STRIPE_EXAMPLE_PUBLISHABLE_KEY" >> ~/.gradle/gradle.properties
- activate-build-cache-for-gradle:
inputs:
- push: 'true'
- validation_level: warning
conclude_all:
steps:
- script-runner@0:
is_always_run: true
title: Copy test results to tmp
inputs:
- file_path: ./scripts/copy_test_results_to_tmp.sh
- deploy-to-bitrise-io@2:
inputs:
- notify_user_groups: none
- is_compress: "true"
- deploy_path: /tmp/test_results
- is_enable_public_page: "false"
title: Deploy test results artifacts
- save-gradle-configuration-cache@1: { }
- save-gradle-cache@1:
inputs:
- save_transforms: true
step_bundles:
export_unit_test_results:
inputs:
- test_title: Unit tests
steps:
- bundle::export_test_results:
inputs:
- test_title: $test_title
- test_type: unit
export_instrumentation_test_results:
inputs:
- test_title: Instrumentation tests
steps:
- script@1:
title: Split instrumentation test results
is_skippable: true
is_always_run: true
timeout: 1200
inputs:
- content: ./gradlew splitInstrumentationTestReportsByClass
- bundle::export_test_results:
inputs:
- test_title: $test_title
- test_type: instrumentation
export_test_results:
inputs:
- test_title: tests
- test_type: unit
steps:
- script@1:
is_always_run: true
is_skippable: true
title: Test results
inputs:
- content: |
#!/usr/bin/env bash
bash "$BITRISE_SOURCE_DIR/scripts/store_in_bitrise_test_results_folder.sh" "$test_type" "$test_title"
meta:
bitrise.io:
stack: ubuntu-resolute-26.04-bitrise-2026-android
machine_type_id: g2.linux.medium