-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathstep.yml
333 lines (299 loc) · 13.6 KB
/
step.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
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
#
# A couple of useful guides & docs:
#
# - Main Bitrise CLI docs: https://github.com/bitrise-io/bitrise/tree/master/_docs
# - Step Development Guideline: https://github.com/bitrise-io/bitrise/blob/master/_docs/step-development-guideline.md
# - Bitrise.yml format spec: https://github.com/bitrise-io/bitrise/blob/master/_docs/bitrise-yml-format-spec.md
# - Bitrise docs: http://devcenter.bitrise.io/
# - Bitrise CLI guides: http://devcenter.bitrise.io/bitrise-cli/
title: |-
[Beta] Firebase Test Labs
summary: |
[Beta] Automatic deployment of iOS and Android Flutter Integration tests through Firebase Test Labs
description: |-
[Beta] Automatic deployment of iOS and Android Flutter Integration tests to Firebase Test Labs
This step allows you to automate the process of deploying tests to be run on **physical devices** on Firebase Test Labs.
Before using this step, ensure to go through the following setup required:
- 1) [Setup a Firebase project for your app](https://firebase.google.com/docs/flutter/setup?platform=android)
- 2) [Setup a Service Account for your Firebase project](https://firebase.google.com/support/guides/service-accounts)
- 3) [Project Setup to test your app on virtual devices](https://github.com/flutter/flutter/tree/main/packages/integration_test#android-device-testing)
- **NOTE**: To run your project's tests on an iOS device on Firebase Test Labs you must properly
codesign your app in the workflow before this step is run. [The documentation can be found here](https://devcenter.bitrise.io/en/code-signing/ios-code-signing/managing-ios-code-signing-files---automatic-provisioning.html)
- If you would not like to follow the documentation's guidance on using automatic code signing, you could also choose
to upload a proper provisioning profile for your iOS application to the Code Signing & Files tab in the workflow editor
on Bitrise. Then, add the "Certificate and profile installer" step (without editing the configuration) to your
workflow before this step is run.
- To save build credits and time, this step runs the firebase test command with the --async flag, so the command can
be run without waiting for test results to come back. This is not to be confused with the timeout input below.
website: https://github.com/AnthonyDadeWT/bitrise-step-firebase-test-labs
source_code_url: https://github.com/AnthonyDadeWT/bitrise-step-firebase-test-labs
support_url: https://github.com/AnthonyDadeWT/bitrise-step-firebase-test-labs/issues
# If this step should be available only for certain project types
# just uncomment this `project_type_tags` section and include all the
# project types supported by the step. If the step can be used for all
# project types then you can just remove this section.
# If no `project_type_tags` specified (or specified as an empty array)
# that means the step can be used for any project type.
# You can find more information about project type tags in the Step Development Guideline:
# https://github.com/bitrise-io/bitrise/blob/master/_docs/step-development-guideline.md
#
project_type_tags:
- flutter
- ios
- android
# Type tags are used for categorizing steps, for easier step discovery in Step Libraries.
# You can find more information about type tags in the Step Development Guideline:
# https://github.com/bitrise-io/bitrise/blob/master/_docs/step-development-guideline.md
type_tags:
- test
- deploy
# These properties define whether a Step is run in a given Workflow or not.
# You can find more information about this in the documentation here:
# https://devcenter.bitrise.io/en/steps-and-workflows/developing-your-own-bitrise-step/developing-a-new-step.html#setting-conditions-for-running-the-step
#
# is_always_run: false
# is_skippable: false
# run_if: ""
# Use the `deps` property to declare dependencies that you can fetch from an OS dependency manager.
# You can find more information about this in the documentation here:
# https://devcenter.bitrise.io/en/steps-and-workflows/developing-your-own-bitrise-step/developing-a-new-step.html#submodules-and-step-dependencies
#
# deps:
# brew:
# - name: cmake
# apt_get:
# - name: cmake
deps:
brew:
- name: google-cloud-sdk
- name: flutter
is_always_run: false
is_skippable: false
run_if: ""
toolkit:
bash:
entry_file: step.sh
inputs:
- service_account_credentials_file:
opts:
title: "Service Account Credentials File"
summary: |
The path or HTTP URL to your [service account](https://firebase.google.com/docs/app-distribution/android/distribute-gradle#authenticate_using_a_service_account) private key JSON file.
description: |
Follow the [documentation](https://firebase.google.com/docs/app-distribution/android/distribute-gradle#authenticate_using_a_service_account) to setup a service account.
You can avoid pushing this JSON file to your repository by storing the JSON contents as a secret, then in a custom script,
create a new file, and echo the contents of that secret into the file, and then set this input to that file path.
is_required: true
is_sensitive: true
- project_id:
opts:
title: "Firebase Project ID"
summary: |
Firebase Project ID. Can be found in the Firebase console, under the project name in Project settings.
description: |
Note: this is NOT an App ID. There should only be one Project ID for your entire Firebase project, even if it includes multiple "apps".
is_required: true
is_sensitive: true
- integration_test_path:
opts:
title: Path to Integration Tests
summary: |
Path to integration test file to be sent to Firebase. example: integration_test/foo.dart
description: |
is_required: true
- locale: en_US
opts:
title: Locale / Language
summary: |
Specify the Locale to test on, set to English by default
[List of locales](https://help.sap.com/docs/SAP_BUSINESSOBJECTS_BUSINESS_INTELLIGENCE_PLATFORM/09382741061c40a989fae01e61d54202/46758c5e6e041014910aba7db0e91070.html)
is_required: true
- orientation: portrait
opts:
title: Orientation
summary: Specify the device orientation
is_required: true
- timeout: 15m
opts:
title: Timeout
summary: Set a maximum time limit on how long your tests run for
description: |
The max time this test execution can run before it is cancelled (default: 15m).
It does not include any time necessary to prepare and clean up the target device.
The maximum possible testing time is 45m on physical devices and 60m on virtual devices
The timeout units can be h, m, or s. If no unit is given, seconds are assumed.
Examples: 1h is 1 hour, 200s is 200 seconds, 15m is 15 minutes
is_required: true
- test_ios: "false"
opts:
title: "Run Tests on iOS Device?"
value_options:
- "true"
- "false"
summary: |
If you'd like to run your tests on an iOS device, set this to true. Otherwise set it to false
- test_android: "true"
opts:
title: "Run Tests on Android Device?"
value_options:
- "true"
- "false"
summary: |
If you'd like to run your tests on an Android device, set this to true. Otherwise set it to false
- build_flavor:
opts:
title: Build Flavor
summary: |
Specify a specific build flavor you'd like to use to build your project.
description: |
This should only be used on projects that have already setup flavors, and you use --flavor <flavor> to build or run your project.
https://docs.flutter.dev/deployment/flavors
is_required: false
- firebase_additional_flags:
opts:
title: Additional Firebase Flags
summary: |
Additional flags to be appended to the Firebase command: gcloud firebase test (platform) run
description: |
Make sure to include the -- when adding in additional flags to this input i.e. --flag value --flag value ...
is_required: false
## iOS Configuration Category ##
- simulator_model: iphone11pro
opts:
category: iOS Configuration
title: Simulator
summary: Specify the simulator Test Labs uses to run your tests [Firebase Documentation](https://firebase.google.com/docs/test-lab/android/available-testing-devices)
description: |
NOTE: This input is dependent on the available devices Test Labs has available for you to use
with the operating system you'll select below. [Firebase Documentation](https://firebase.google.com/docs/test-lab/android/available-testing-devices)
is_required: true
- deployment_target: "16.6"
opts:
category: iOS Configuration
title: iOS Deployment Target
summary: Specify the iOS version of the device
description: |
NOTE: This input is dependent on the available operating system Test Labs has available for you to use
with the device you've selected above. [Documentation](https://firebase.google.com/docs/test-lab/android/available-testing-devices)
is_required: true
- ios_configuration: Release
opts:
category: iOS Configuration
title: Xcode Build Configuration
summary: |-
Xcode Build Configuration.
description: |
If not specified, the default Build Configuration will be used.
Use xcodebuild -list to see available configurations for your project.
The input value sets xcodebuild's `-configuration` option.
is_required: true
- scheme: Runner
opts:
category: iOS Configuration
title: Schema
summary: Specify an Xcode Schema you'd like to use for iOS
description: |
Specify an Xcode Schema you'd like to use for iOS
Run xcodebuild -list in the iOS directory to list available schemes for your project
By default, this is set to Runner
example: Runner, dev, release, etc
is_required: true
- output_path: ../build/ios_integ
opts:
category: iOS Configuration
title: Output Path
summary: The path to the folder where the iOS integration executable will output
is_required: true
- product_path: build/ios_integ/Build/Products
opts:
category: iOS Configuration
title: Product Path
summary: "The path to the zip folder containing a .xctestrun and a folder containing the .app to be deployed"
is_required: true
- workspace: Runner.xcworkspace
opts:
category: iOS Configuration
title: xcworkspace File
summary: Specify the iOS workspace
is_required: true
- config_file_path: Flutter/Release.xcconfig
opts:
category: iOS Configuration
title: Path to .xcconfig
summary: The path that points to the .xcconfig you'd like to use
is_required: true
- dev_target: "16.4"
opts:
category: iOS Configuration
title: Development Target
summary: Specify a development target
description: |
The name of the test runner will be “Runner_iphoneos$dev_target-arm64.xctestrun”,
where the value of “dev_target” may vary based on the Xcode version.
is_required: true
- xcodebuild_additional_flags:
opts:
title: Additional xcodebuild Flags
category: iOS Configuration
summary: |
Additional flags to be appended to the xcodebuild command
description: |
Make sure to include the -- when adding in additional flags to this input i.e. --flag value --flag value ...
is_required: false
## Android Configuration Category ##
- android_apk_path: build/app/outputs/apk/debug/app-debug.apk
opts:
category: Android Configuration
title: App APK Path
summary: The path to the APK of your app
description: |
If you use a build flavor, don't worry about modifying this path as this Step will handle the inclusion of build flavors
to the path automatically
is_required: true
- android_test_apk_path: build/app/outputs/apk/androidTest/debug/app-debug-androidTest.apk
opts:
category: Android Configuration
title: androidTest App APK Path
summary: The path to the Test APK of your app
description: |
If you use a build flavor, don't worry about modifying this path as this Step will handle the inclusion of build flavors
to the path automatically
is_required: true
- android_device_model_id: redfin
opts:
category: Android Configuration
title: Device Model ID
summary: Specify the Model ID of the Firebase Test Labs Device - [Firebase Documentation](https://firebase.google.com/docs/test-lab/android/available-testing-devices)
description: |
NOTE: This input is dependent on the available devices Test Labs has available for you to use
with the operating system you'll select below. [Firebase Documentation](https://firebase.google.com/docs/test-lab/android/available-testing-devices)
Run gcloud firebase test android models list to see all available devices.
**NOTE: For physical devices, you must use the MODEL_ID**
is_required: true
- android_version: 30
opts:
category: Android Configuration
title: Android API Version
summary: Specify the Android API version for the device above - [Firebase Documentation](https://firebase.google.com/docs/test-lab/android/available-testing-devices)
description: |
NOTE: This input is dependent on the available operating system Test Labs has available for you to use
with the device you've selected above. [Firebase Documentation](https://firebase.google.com/docs/test-lab/android/available-testing-devices)
is_required: true
outputs:
- EXAMPLE_STEP_OUTPUT:
opts:
title: "Example Step Output"
summary: Summary. No more than 2-3 sentences.
description: |
Description of this output.
Can be Markdown formatted text.
##
##- example_step_input:
## opts:
#### summary: Summary. No more than 2-3 sentences.
## description: |
## Description of this input.
## Can be Markdown formatted text.
## is_expand: true
### value_options: []
###