@@ -23,10 +23,34 @@ commands:
23
23
working_directory : example/ios
24
24
command : pod install --repo-update
25
25
setup_captain :
26
+ parameters :
27
+ platform :
28
+ type : enum
29
+ enum :
30
+ - ios
31
+ - android
26
32
steps :
27
33
- run :
28
34
name : Install Appium
29
- command : npm install -g appium
35
+ command : npm install -g appium@next
36
+ - when :
37
+ condition :
38
+ equal :
39
+ - <<parameters.platform>>
40
+ - ios
41
+ steps :
42
+ - run :
43
+ name : Install XCUITest Driver
44
+ command : appium driver install xcuitest
45
+ - when :
46
+ condition :
47
+ equal :
48
+ - <<parameters.platform>>
49
+ - android
50
+ steps :
51
+ - run :
52
+ name : Install UIAutomator2 Driver
53
+ command : appium driver install uiautomator2
30
54
- run :
31
55
name : Launch Appium
32
56
# Enable --relaxed-security for `mobile: shell` command that Captain uses internally.
@@ -43,6 +67,9 @@ commands:
43
67
- run :
44
68
name : Clone Captain
45
69
command :
git clone [email protected] :Instabug/Captain.git ../Instabug.Captain
70
+ - run :
71
+ name : Configure Captain Platform
72
+ command : echo 'export CAPTAIN_PLATFORM=<<parameters.platform>>' >> $BASH_ENV
46
73
47
74
jobs :
48
75
danger :
@@ -91,13 +118,14 @@ jobs:
91
118
tag : 2022.04.1
92
119
steps :
93
120
- checkout
94
- - setup_captain
121
+ - setup_captain :
122
+ platform : android
95
123
- setup_flutter
96
124
- android/start-emulator-and-run-tests :
97
125
system-image : system-images;android-30;google_apis;x86
98
126
additional-avd-args : -d "pixel_4"
99
127
post-emulator-launch-assemble-command : cd example || true && flutter build apk --debug
100
- test-command : cd e2e || true && CAPTAIN_PLATFORM=android dotnet test
128
+ test-command : cd e2e || true && dotnet test
101
129
102
130
test_ios :
103
131
macos :
@@ -122,7 +150,8 @@ jobs:
122
150
resource_class : large
123
151
steps :
124
152
- checkout
125
- - setup_captain
153
+ - setup_captain :
154
+ platform : ios
126
155
- setup_ios
127
156
- run :
128
157
name : Build Example App
@@ -133,8 +162,6 @@ jobs:
133
162
no_output_timeout : 30m
134
163
working_directory : e2e
135
164
command : dotnet test
136
- environment :
137
- CAPTAIN_PLATFORM : ios
138
165
139
166
format_flutter :
140
167
docker :
0 commit comments