forked from rainbow-me/rainbow
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbitrise.yml
178 lines (175 loc) Β· 4.86 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
---
format_version: 1.1.0
default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git
trigger_map:
- push_branch: develop
workflow: workflow_testflight
- pull_request_source_branch: "*"
workflow: workflow_tests
pull_request_target_branch: develop
workflows:
build_setup:
steps:
run_if: '{{getenv "SSH_RSA_PRIVATE_KEY" | ne ""}}'
- [email protected]: {}
inputs:
- node_version: 10.15.3
title: Restoring cache
inputs:
- cache_local_deps: 'yes'
- command: install --network-timeout 300000 --frozen-lockfile --network-concurrency
1
title: Installing dependencies via yarn
before_run:
after_run:
lint:
before_run: []
after_run: []
steps:
inputs:
- command: lint
title: Linting for Errors
detox_tests:
before_run: []
after_run: []
steps:
inputs:
- content: |-
#!/bin/bash
detox build --configuration ios.sim.release
title: Detox - Build Release App
inputs:
- content: |-
#!/bin/bash
detox test --configuration ios.sim.release --cleanup
title: Detox - Run E2E Tests
detox_setup:
steps:
inputs:
- cache_local_deps: 'yes'
- command: global add detox-cli
title: Detox - Install CLI
inputs:
- content: |-
#!/bin/bash
detox clean-framework-cache && detox build-framework-cache
title: Detox - Clean & Build Framework cache
pods_setup:
steps:
inputs:
- content: pod repo update
title: Pods - Update repo
inputs:
- content: cd ios && pod install
title: Pods - Install
react_native_setup:
before_run: []
steps:
inputs:
- content: |-
#!/bin/bash
brew update
brew tap wix/brew
brew install --HEAD applesimutils
title: React Native - Install dependencies via Brew
inputs:
- command: global add react-native-cli
title: React Native - Install CLI
workflow_testflight:
before_run:
- build_setup
- generate_dot_env
- pods_setup
steps:
- [email protected]: {}
inputs:
- work_dir: "$BITRISE_SOURCE_DIR/ios"
- lane: beta
title: Fastlane - Submit to Testflight
inputs:
- command: global add sentry-cli
title: Install Sentry CLI
inputs:
- work_dir: "$BITRISE_SOURCE_DIR/ios"
- lane: refresh_dsyms
title: Fastlane - Upload debug symbols and sourcemaps
envs:
- opts:
is_expand: false
SENTRY_ENVIRONMENT: Release
after_run:
- store_cache_artifacts
workflow_tests:
before_run:
- build_setup
- lint
- pods_setup
- detox_setup
- generate_dot_env
- react_native_setup
- detox_tests
envs:
- opts:
is_expand: false
SENTRY_ENVIRONMENT: LocalRelease
steps:
inputs:
- channel: "#bitrise"
- from_username: Bitrise Bot
- pretext: "* All Tests Passed! *"
- channel_on_error: "#bitrise"
- text_on_error: Build failed
- emoji_on_error: ''
- from_username_on_error: Bitrise bot
- webhook_url: "$SLACK_WEBHOOK_URL"
after_run:
- store_cache_artifacts
generate_dot_env:
steps:
inputs:
- content: |
#!/usr/bin/env bash
# fail if any commands fails
set -e
# debug log
set -x
# write your script here
touch .env
echo "DATA_ORIGIN=$DATA_ORIGIN" >> .env
echo "REACT_APP_INFURA_PROJECT_ID=$REACT_APP_INFURA_PROJECT_ID" >> .env
echo "REACT_APP_SEGMENT_API_WRITE_KEY=$REACT_APP_SEGMENT_API_WRITE_KEY" >> .env
echo "DATA_API_KEY=$DATA_API_KEY" >> .env
echo "SENTRY_ENDPOINT=$SENTRY_ENDPOINT" >> .env
echo "SENTRY_ENVIRONMENT=$SENTRY_ENVIRONMENT" >> .env
echo "WYRE_ENDPOINT=$WYRE_ENDPOINT" >> .env
echo "WYRE_ACCOUNT_ID=$WYRE_ACCOUNT_ID" >> .env
echo "RAINBOW_WYRE_MERCHANT_ID=$RAINBOW_WYRE_MERCHANT_ID" >> .env
title: Generate .env file
store_cache_artifacts:
steps:
inputs:
- cache_paths: |-
$BITRISE_CACHE_DIR
$BITRISE_SOURCE_DIR/node_modules
~/Library/Developer/Xcode/DerivedData
title: Store cache artifacts
is_always_run: true