Skip to content

Commit 9ab35ba

Browse files
fix ios pipeline (#36)
Fix iOS pipeline
1 parent 759be6a commit 9ab35ba

File tree

4 files changed

+12
-13
lines changed

4 files changed

+12
-13
lines changed

.circleci/config.yml

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ version: 2.1
99
# See: https://circleci.com/docs/jobs-steps/#jobs-overview & https://circleci.com/docs/configuration-reference/#jobs
1010
jobs:
1111
build:
12-
# Specify the execution environment.
12+
# Specify the execution environment.
1313
# See: https://circleci.com/docs/executor-intro/ & https://circleci.com/docs/configuration-reference/#executor-job
1414
macos:
1515
# Specify the Xcode version you desire here
1616
# See: https://circleci.com/docs/using-macos/
17-
xcode: 15.2.0
17+
xcode: 15.2.0
1818

1919
# Add steps to the job
2020
# See: https://circleci.com/docs/jobs-steps/#steps-overview & https://circleci.com/docs/configuration-reference/#steps
@@ -25,26 +25,25 @@ jobs:
2525
- run:
2626
name: Node Version
2727
command: |
28-
nvm install v19.0.0 && nvm alias default 19.0.0
28+
nvm install v20.2.0 && nvm alias default 20.2.0
2929
- run:
3030
name: Install Appium and Run iOS Test
3131
command: |
3232
release_info=$(curl -s https://api.github.com/repos/AppiumTestDistribution/appium-flutter-server/releases/latest)
3333
asset_urls=$(echo "$release_info" | grep "browser_download_url" | cut -d '"' -f 4)
3434
ios_app=$(echo "$asset_urls" | tail -n 1)
3535
echo "$ios_app"
36-
nvm install v19.0.0 && nvm alias default 19.0.0
36+
nvm install v20.2.0 && nvm alias default 20.2.0
3737
node -v
3838
target_sim_id=$(xcrun simctl list devices available | grep "iPhone 14" | cut -d "(" -f2 | cut -d ")" -f1 | head -n 1)
3939
echo $target_sim_id
4040
echo 'export UDID=$target_sim_id' >> $BASH_ENV
4141
xcrun simctl boot $target_sim_id
4242
xcrun simctl bootstatus $target_sim_id -b
4343
npm install -g appium
44-
appium driver install xcuitest
45-
appium driver run xcuitest build-wda
46-
npm install
44+
npm ci
4745
npm run build
46+
appium driver run xcuitest build-wda
4847
wda=$(ls -d /Users/distiller/Library/Developer/Xcode/DerivedData/WebDriverAgent*)
4948
echo $wda
5049
echo 'export WDA_PATH=$wda' >> $BASH_ENV
@@ -66,7 +65,7 @@ jobs:
6665
# Orchestrate jobs using workflows
6766
# See: https://circleci.com/docs/workflows/ & https://circleci.com/docs/configuration-reference/#workflows
6867
workflows:
69-
sample: # This is the name of the workflow, feel free to change it to better match your workflow.
68+
ios: # This is the name of the workflow, feel free to change it to better match your workflow.
7069
# Inside the workflow, you define the jobs you want to run.
7170
jobs:
72-
- build
71+
- build

ios.conf.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ export const config: WebdriverIO.Config = {
1515
"appium:usePreinstalledWDA": true,
1616
"appium:showIOSLog": false,
1717
"appium:flutterSystemPort": 31321,
18-
"appium:wdaLocalPort": 8456
18+
"appium:wdaLocalPort": 8456,
19+
'appium:flutterServerLaunchTimeout': 10000,
1920
},
2021
],
2122
};

src/utils.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import AndroidUiautomator2Driver from 'appium-uiautomator2-driver';
2-
import XCUITestDriver from 'appium-xcuitest-driver/build/lib/driver';
32
import { findAPortNotInUse } from 'portscanner';
43
import { waitForCondition } from 'asyncbox';
54
import { JWProxy } from '@appium/base-driver';
@@ -18,7 +17,7 @@ export async function getProxyDriver(
1817
return this.proxy;
1918
} else if (this.proxydriver instanceof AndroidUiautomator2Driver) {
2019
return this.proxydriver.uiautomator2.jwproxy;
21-
} else if (this.proxydriver instanceof XCUITestDriver) {
20+
} else {
2221
return this.proxydriver.wda.jwproxy;
2322
}
2423
}

wdio.conf.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ export const config: Options.Testrunner = {
7777
// Define all options that are relevant for the WebdriverIO instance here
7878
//
7979
// Level of logging verbosity: trace | debug | info | warn | error | silent
80-
logLevel: 'info',
80+
logLevel: 'debug',
8181
//
8282
// Set specific log levels per logger
8383
// loggers:

0 commit comments

Comments
 (0)