forked from stripe/stripe-terminal-react-native
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bitrise.yml
270 lines (270 loc) · 6.83 KB
/
bitrise.yml
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
---
format_version: '11'
default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git
project_type: react-native
pipelines:
main-trigger-pipeline:
stages:
- stage-trigger-run-main: {}
pr-trigger-pipeline:
stages:
- stage-trigger-run-pr: {}
stages:
stage-trigger-run-pr:
workflows:
- lint: {}
- typescript: {}
- unit-js: {}
- unit-android: {}
- example-build-ios: {}
- example-build-android: {}
- e2e-android: {}
- e2e-ios: {}
stage-trigger-run-main:
workflows:
- lint: {}
- typescript: {}
- unit-js: {}
- unit-android: {}
- example-build-ios: {}
- example-build-android: {}
- e2e-android: {}
- e2e-ios: {}
- deploy-firebase-android: {}
workflows:
complete_all:
steps:
- save-npm-cache@1: {}
- save-cocoapods-cache@1: {}
- deploy-to-bitrise-io@2: {}
deploy-firebase-android:
steps:
- fastlane@3:
inputs:
- connection: "off"
- lane: increment_version app_id:$FIREBASE_APP_ID_ANDROID version_suffix:$VERSION_SUFFIX
title: fastlane increment version
- yarn@0:
inputs:
- command: dev-app:build:android:release
- cache_local_deps: 'yes'
title: Build app for Firebase deploy
- fastlane@3:
inputs:
- connection: "off"
- lane: publish_to_firebase app_id:$FIREBASE_APP_ID_ANDROID firebase_token:$FIREBASE_TOKEN
title: fastlane distribute app
before_run:
- prep_all
after_run:
- complete_all
e2e-android:
steps:
- avd-manager@1:
inputs:
- emulator_id: TestingAVD
- tag: default
- abi: x86_64
- api_level: '30'
- yarn@0:
inputs:
- command: install --frozen-lockfile
- cache_local_deps: 'yes'
title: yarn install --frozen-lockfile
- yarn@0:
inputs:
- command: e2e:build:android:release
- cache_local_deps: 'yes'
title: build for detox
- yarn@0:
inputs:
- command: e2e:test:android:release
- cache_local_deps: 'yes'
title: test detox
before_run:
- prep_all
after_run:
- complete_all
meta:
bitrise.io:
stack: linux-docker-android-20.04
machine_type_id: elite-xl
e2e-ios:
steps:
- bundler@0: {}
- script@1:
inputs:
- content: |-
set -e
# This is a terrible hack, as I haven't worked out how Bitrise's `pod install` step interacts with the rbenv set in this app. You definitely shouldn't copy this.
cd dev-app/ios && rbenv install 2.7.4 && bundle install && \
gem install cocoapods -v 1.11.3 && pod install && cd - && \
echo "Checking for diffs in pod lockfile, if this fails please ensure all dependencies are up to date" && \
git diff --exit-code
title: Set up cocoapods
- yarn@0:
inputs:
- command: e2e:build:ios:release
- cache_local_deps: 'yes'
title: build for detox
- yarn@0:
inputs:
- command: e2e:test:ios:release
- cache_local_deps: 'yes'
title: test detox
before_run:
- prep_all
after_run:
- complete_all
example-build-android:
steps:
- avd-manager@1:
inputs:
- emulator_id: TestingAVD
- tag: default
- abi: x86_64
- api_level: '30'
- yarn@0:
inputs:
- command: build:android:ci
- cache_local_deps: 'yes'
- workdir: example-app
title: yarn build:android
before_run:
- prep_all
after_run:
- complete_all
meta:
bitrise.io:
stack: osx-xcode-14.0.x-ventura
machine_type_id: g2.12core
example-build-ios:
steps:
- cocoapods-install@2:
inputs:
- source_root_path: "$BITRISE_SOURCE_DIR/example-app/ios"
- yarn@0:
inputs:
- command: e2e:build:example:ios
- cache_local_deps: 'yes'
title: yarn e2e:build:example:ios
before_run:
- prep_all
after_run:
- complete_all
lint:
steps:
- yarn@0:
inputs:
- cache_local_deps: 'yes'
- command: lint
title: yarn lint
before_run:
- prep_all
after_run:
- complete_all
meta:
bitrise.io:
stack: linux-docker-android-20.04
machine_type_id: standard
prep_all:
steps:
- activate-ssh-key@4: {}
- git-clone@6: {}
- restore-npm-cache@1: {}
- restore-cocoapods-cache@1: {}
- script@1:
inputs:
- content: |-
echo 'export PATH="$PATH:~/project/node_modules/.bin:~/project/dev-app/node_modules/.bin"' >> $BASH_ENV
source $BASH_ENV
brew update >/dev/null
brew bundle install >/dev/null
touch .watchmanconfig
npm install --global expo-cli
title: Misc prep steps
- yarn@0:
inputs:
- cache_local_deps: 'yes'
- workdir: example-app
- command: install
title: yarn install example-app
- yarn@0:
inputs:
- cache_local_deps: 'yes'
- workdir: dev-app
- command: install
title: yarn install dev-app
- yarn@0:
inputs:
- cache_local_deps: 'yes'
- command: install
title: yarn install
- script@1:
inputs:
- content: |-
echo "Checking for diffs in yarn lockfile, if this fails please ensure all dependencies are up to date"
git diff --exit-code
title: Check for diffs in yarn lockfile
typescript:
steps:
- yarn@0:
inputs:
- cache_local_deps: 'yes'
- command: typescript
title: yarn typescript
- yarn@0:
inputs:
- workdir: example-app
- cache_local_deps: 'yes'
- command: typescript
title: yarn typescript example-app
before_run:
- prep_all
after_run:
- complete_all
unit-android:
steps:
- yarn@0:
inputs:
- command: unit-test:android
- cache_local_deps: 'yes'
title: yarn unit-test:android
before_run:
- prep_all
after_run:
- complete_all
unit-js:
steps:
- yarn@0:
inputs:
- command: unit-test:js --coverage
- cache_local_deps: 'yes'
title: yarn unit-test:js --coverage
before_run:
- prep_all
after_run:
- complete_all
meta:
bitrise.io:
stack: osx-xcode-14.0.x-ventura
machine_type_id: g2-m1.8core
app:
envs:
- opts:
is_expand: false
PLATFORM: all
- opts:
is_expand: false
API_CA_URL_ANDROID: http://10.0.2.2:3003
- opts:
is_expand: false
API_URL: http://127.0.0.1:3002
- opts:
is_expand: false
API_URL_ANDROID: http://10.0.2.2:3002
trigger_map:
- push_branch: "*"
pipeline: main-trigger-pipeline
- pull_request_source_branch: "*"
pipeline: pr-trigger-pipeline