-
Notifications
You must be signed in to change notification settings - Fork 106
Expand file tree
/
Copy pathbitrise.yml
More file actions
122 lines (119 loc) · 4.16 KB
/
bitrise.yml
File metadata and controls
122 lines (119 loc) · 4.16 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
---
format_version: '11'
default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git
project_type: react-native
workflows:
primary:
steps:
- activate-ssh-key@4:
run_if: '{{getenv "SSH_RSA_PRIVATE_KEY" | ne ""}}'
- git-clone@8: {}
- restore-npm-cache@2: {}
- restore-cocoapods-cache@2: {}
- nvm@1:
inputs:
- node_version_number: '24'
- script@1:
title: Install pnpm and dependencies
inputs:
- working_dir: example
- content: |-
#!/usr/bin/env bash
set -e
set -x
npm install -g pnpm
pnpm install
- script@1:
title: Expo Prebuild iOS
inputs:
- working_dir: example
- content: |-
#!/usr/bin/env bash
set -e
set -x
pnpm expo prebuild --platform ios --clean
- npm@3:
inputs:
- command: install -g detox-cli
- workdir: example
- cocoapods-install@3:
inputs:
- source_root_path: '$BITRISE_SOURCE_DIR/example/ios'
- restore-cache@1:
title: Restore Detox Build Cache
inputs:
- key: |-
detox-build-{{ checksum "example/ios/Podfile.lock" }}-{{ checksum "example/app.json" }}
detox-build-
- script@1:
inputs:
- working_dir: example
- content: "#!/usr/bin/env bash\n# fail if any commands fails\nset -e\n# debug
log\nset -x\n \n# applesimutils is a collection of utils for Apple simulators\nbrew
tap wix/brew\nbrew install applesimutils"
title: Detox Install
- script@1:
title: Detox Build Framework Cache
inputs:
- working_dir: example
- content: |-
#!/usr/bin/env bash
set -e
set -x
detox clean-framework-cache
detox build-framework-cache
- script@1:
inputs:
- working_dir: example
- content: "#!/usr/bin/env bash\n# fail if any commands fails\nset -e\n# debug
log\nset -x\n \n# we are building a release device configuration\npnpm
detox build --configuration ios.sim.release"
title: Detox Build
- save-cache@1:
title: Save Detox Build Cache
inputs:
- key: detox-build-{{ checksum "example/ios/Podfile.lock" }}-{{ checksum "example/app.json" }}
- paths: example/ios/build
- is_key_unique: "true"
- script@1:
inputs:
- working_dir: example
- content: |-
#!/usr/bin/env bash
set -x
# Run detox tests and capture output + exit code
pnpm detox test --configuration ios.sim.release --cleanup 2>&1 | tee /tmp/detox-output.log
DETOX_EXIT_CODE=${PIPESTATUS[0]}
# If tests failed, post a PR comment with the failure details
if [ $DETOX_EXIT_CODE -ne 0 ]; then
echo "Detox tests failed (exit code: $DETOX_EXIT_CODE). Reporting to GitHub PR..."
bash scripts/report-detox-failures.sh /tmp/detox-output.log || echo "Warning: Failed to post PR comment"
fi
# Propagate the original exit code so Bitrise still marks the build as failed
exit $DETOX_EXIT_CODE
title: Detox Test
- save-npm-cache@1: {}
- save-cocoapods-cache@1: {}
- deploy-to-bitrise-io@2:
inputs:
- deploy_path: example
app:
envs:
- opts:
is_expand: false
BITRISE_PROJECT_PATH: example/ios/SwiperFlatListExample.xcworkspace
- opts:
is_expand: false
BITRISE_SCHEME: SwiperFlatListExample
- opts:
is_expand: false
BITRISE_EXPORT_METHOD: development
trigger_map:
- push_branch: master
workflow: primary
- pull_request_source_branch: '*'
workflow: primary
pull_request_target_branch: master
meta:
bitrise.io:
stack: osx-xcode-26.0.x