@@ -2,9 +2,10 @@ version: 2.1
2
2
3
3
orbs :
4
4
android :
circleci/[email protected]
5
- flutter : circleci/flutter@2.0.2
5
+ flutter : circleci/flutter@2.1.0
6
6
7
7
advanced-checkout :
vsco/[email protected]
8
+
8
9
9
10
commands :
10
11
setup_flutter :
@@ -17,79 +18,55 @@ commands:
17
18
setup_ios :
18
19
steps :
19
20
# Flutter doesn't support Apple Silicon yet, so we need to install Rosetta use Flutter on M1 machines.
20
- - run :
21
- name : Install Rosetta
22
- command : softwareupdate --install-rosetta --agree-to-license
21
+ - ios/install-rosetta
23
22
- setup_flutter
24
23
- run :
25
24
name : Install CocoaPods
26
25
command : sudo gem install cocoapods
27
- - run :
28
- name : Install Pods
29
- working_directory : example/ios
30
- command : pod install --repo-update
31
- setup_captain :
32
- parameters :
33
- platform :
34
- type : enum
35
- enum :
36
- - ios
37
- - android
26
+ - flutter/install_ios_pod :
27
+ app-dir : example
28
+ repo-update : true
29
+ setup_patrol :
38
30
steps :
39
31
- run :
40
- name : Install Appium
41
- command : npm install -g appium
42
- - when :
43
- condition :
44
- equal :
45
- - <<parameters.platform>>
46
- - ios
47
- steps :
48
- - run :
49
- name : Install XCUITest Driver
50
- command :
appium driver install [email protected]
51
- - when :
52
- condition :
53
- equal :
54
- - <<parameters.platform>>
55
- - android
56
- steps :
57
- - run :
58
- name : Install UIAutomator2 Driver
59
- command :
appium driver install [email protected]
60
- - run :
61
- name : Launch Appium
62
- # Enable --relaxed-security for `mobile: shell` command that Captain uses internally.
63
- command : appium --relaxed-security
64
- background : true
65
- - run :
66
- name : Install .NET 6
67
- command : curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin --channel 6.0.1xx
68
- - run :
69
- name : Add .NET to PATH
32
+ name : Add pub-cache bin to PATH
70
33
command : |
71
- echo 'export DOTNET_ROOT=$ HOME/.dotnet ' >> $BASH_ENV
72
- echo 'export PATH=$PATH:$DOTNET_ROOT:$DOTNET_ROOT/tools' >> $BASH_ENV
34
+ echo 'export PATH="$PATH:$ HOME/.pub-cache/bin" ' >> $BASH_ENV
35
+ source $BASH_ENV
73
36
- run :
74
- name : Clone Captain
75
- command :
git clone [email protected] :Instabug/Captain.git ../Instabug.Captain
76
- - run :
77
- name : Configure Captain Platform
78
- command : echo 'export CAPTAIN_PLATFORM=<<parameters.platform>>' >> $BASH_ENV
37
+ name : Install patrol
38
+ command : dart pub global activate patrol_cli 3.5.0
79
39
# This runs `flutter pub get` and `dart pub get` if we pass parameter `generate_pigeons` to the job it also runs the following:
80
40
# - `sh ./scripts/pigeon.sh`
81
41
# - `dart run build_runner build --delete-conflicting-outputs`
82
42
install_flutter_and_dart_packages :
83
43
parameters :
84
44
generate_pigeons :
85
45
type : boolean
46
+ remove_patrol :
47
+ type : boolean
48
+ default : false
49
+ version :
50
+ type : string
51
+ default : " 3.24.0"
86
52
steps :
53
+ - flutter/install_sdk :
54
+ version : <<parameters.version>>
55
+ - when :
56
+ condition :
57
+ equal :
58
+ - <<parameters.remove_patrol>>
59
+ - true
60
+ steps :
61
+ - run :
62
+ name : remove Patrol
63
+ command : cd example && dart pub remove patrol
87
64
- run :
88
65
name : Install Flutter Packages
89
- command : flutter pub get
66
+ command : flutter pub get --verbose
90
67
- run :
91
68
name : Install Dart Packages
92
- command : dart pub get
69
+ command : dart pub get --verbose
93
70
description : Install Dart Packages (for dart explicit packages)
94
71
- when :
95
72
condition :
@@ -123,12 +100,21 @@ jobs:
123
100
parameters :
124
101
version :
125
102
type : string
126
- docker :
127
- - image : cirrusci/flutter:<<parameters.version>>
103
+ executor :
104
+ name : android/android-machine
105
+ resource-class : xlarge
106
+ tag : 2024.01.1
128
107
steps :
129
108
- advanced-checkout/shallow-checkout
130
109
- install_flutter_and_dart_packages :
131
110
generate_pigeons : true
111
+ remove_patrol : true
112
+ version : <<parameters.version>>
113
+ - run :
114
+ name : Install lcov
115
+ command : |
116
+ sudo apt-get update
117
+ sudo apt-get install -y lcov
132
118
- run : flutter test --coverage
133
119
- run :
134
120
working_directory : coverage
@@ -150,26 +136,31 @@ jobs:
150
136
working-directory : example/android
151
137
test-command : ./gradlew test
152
138
153
- e2e_android_captain :
139
+ e2e_android_patrol :
154
140
executor :
155
141
name : android/android-machine
156
142
resource-class : xlarge
157
143
tag : 2024.01.1
158
144
steps :
159
145
- advanced-checkout/shallow-checkout
160
- - setup_captain :
161
- platform : android
162
146
- setup_flutter
163
- - android/start-emulator-and-run-tests :
164
- run-tests-working-directory : e2e
165
- additional-avd-args : --device 3
147
+ - setup_patrol
148
+ - android/create-avd :
149
+ avd-name : ' test'
150
+ install : true
166
151
system-image : system-images;android-33;default;x86_64
167
- post-emulator-launch-assemble-command : cd example && flutter build apk --debug
168
- test-command : dotnet test
152
+ - android/start-emulator :
153
+ avd-name : ' test'
154
+ post-emulator-launch-assemble-command : " "
155
+ - run :
156
+ name : Run E2E Tests
157
+ no_output_timeout : 30m
158
+ working_directory : example
159
+ command : patrol test -t integration_test/
169
160
170
161
test_ios :
171
162
macos :
172
- xcode : 15.2 .0
163
+ xcode : 16.0 .0
173
164
resource_class : macos.m1.medium.gen1
174
165
environment :
175
166
INSTABUG_SOURCEMAPS_UPLOAD_DISABLE : true
@@ -185,31 +176,37 @@ jobs:
185
176
-scheme Runner \
186
177
-resultBundlePath coverage/result.xcresult \
187
178
-sdk iphonesimulator \
188
- -destination 'platform=iOS Simulator,name=iPhone 15 Pro Max,OS=17.2' \
179
+ -destination 'platform=iOS Simulator,name=iPhone 16 Pro Max,OS=18.0' \
180
+ -skip-testing:RunnerUITests \
189
181
test | xcpretty
190
182
191
- e2e_ios_captain :
183
+ e2e_ios_patrol :
192
184
macos :
193
- xcode : 15.2 .0
185
+ xcode : 16.0 .0
194
186
resource_class : macos.m1.medium.gen1
195
187
steps :
196
188
- advanced-checkout/shallow-checkout
197
- - setup_captain :
198
- platform : ios
199
189
- setup_ios
190
+ - setup_patrol
191
+ - ios/preboot-simulator :
192
+ version : " 18.0"
193
+ device : " iPhone 16 Pro"
194
+ - ios/wait-until-simulator-booted
195
+ - ios/wait-until-simulator-booted
200
196
- run :
201
- name : Build Example App
202
- working_directory : example
203
- command : flutter build ios --simulator
197
+ name : sleep 10 seconds
198
+ command : sleep 10
199
+
204
200
- run :
205
201
name : Run E2E Tests
206
202
no_output_timeout : 30m
207
- working_directory : e2e
208
- command : dotnet test
209
-
203
+ working_directory : example
204
+ command : patrol test -t integration_test/ --verbose
210
205
format_flutter :
211
- docker :
212
- - image : cirrusci/flutter
206
+ executor :
207
+ name : android/android-machine
208
+ resource-class : xlarge
209
+ tag : 2024.01.1
213
210
steps :
214
211
- advanced-checkout/shallow-checkout
215
212
- install_flutter_and_dart_packages :
@@ -219,8 +216,10 @@ jobs:
219
216
command : dart format . --set-exit-if-changed
220
217
221
218
lint_flutter :
222
- docker :
223
- - image : cirrusci/flutter
219
+ executor :
220
+ name : android/android-machine
221
+ resource-class : xlarge
222
+ tag : 2024.01.1
224
223
steps :
225
224
- advanced-checkout/shallow-checkout
226
225
- install_flutter_and_dart_packages :
@@ -230,8 +229,10 @@ jobs:
230
229
command : flutter analyze
231
230
232
231
verify_pub :
233
- docker :
234
- - image : cirrusci/flutter
232
+ executor :
233
+ name : android/android-machine
234
+ resource-class : xlarge
235
+ tag : 2024.01.1
235
236
steps :
236
237
- advanced-checkout/shallow-checkout
237
238
- install_flutter_and_dart_packages :
@@ -243,7 +244,7 @@ jobs:
243
244
244
245
release :
245
246
macos :
246
- xcode : 15.2 .0
247
+ xcode : 16.0 .0
247
248
resource_class : macos.m1.medium.gen1
248
249
working_directory : " ~"
249
250
steps :
@@ -288,13 +289,13 @@ workflows:
288
289
- test_flutter-stable
289
290
- test_flutter :
290
291
name : test_flutter-stable
291
- version : stable
292
+ version : 3.24.0
292
293
- test_flutter :
293
294
name : test_flutter-2.10.5
294
295
version : 2.10.5
295
- - e2e_android_captain
296
+ - e2e_android_patrol
296
297
- test_ios
297
- - e2e_ios_captain
298
+ - e2e_ios_patrol
298
299
- format_flutter
299
300
- lint_flutter :
300
301
requires :
@@ -312,9 +313,9 @@ workflows:
312
313
# TODO: Fix the flaky tests and add the following jobs to the dependencies for the release
313
314
# The following jobs have been removed while releasing v13.2.0 to avoid delaying the release
314
315
# as they were just flaky and the tests pass locally without issues.
315
- # - e2e_android_captain
316
+ # - e2e_android_patrol
316
317
# - test_ios
317
- - e2e_ios_captain
318
+ - e2e_ios_patrol
318
319
- verify_pub
319
320
filters :
320
321
branches :
0 commit comments