@@ -8,15 +8,14 @@ version: 2.1
8
8
# Define a job to be invoked later in a workflow.
9
9
# See: https://circleci.com/docs/jobs-steps/#jobs-overview & https://circleci.com/docs/configuration-reference/#jobs
10
10
jobs :
11
- build :
11
+ WDIO_IOS :
12
12
# Specify the execution environment.
13
13
# See: https://circleci.com/docs/executor-intro/ & https://circleci.com/docs/configuration-reference/#executor-job
14
14
macos :
15
15
# Specify the Xcode version you desire here
16
16
# See: https://circleci.com/docs/using-macos/
17
17
xcode : 15.2.0
18
18
19
- # Add steps to the job
20
19
# See: https://circleci.com/docs/jobs-steps/#steps-overview & https://circleci.com/docs/configuration-reference/#steps
21
20
steps :
22
21
# Checkout the code as the first step.
33
32
asset_urls=$(echo "$release_info" | grep "browser_download_url" | cut -d '"' -f 4)
34
33
ios_app=$(echo "$asset_urls" | tail -n 1)
35
34
echo "$ios_app"
35
+ curl -LO $ios_app
36
+ echo 'export APP_PATH=$CIRCLE_WORKING_DIRECTORY/ios.zip' >> $BASH_ENV
37
+ echo $pwd
38
+ echo ls
36
39
nvm install v20.2.0 && nvm alias default 20.2.0
37
40
node -v
38
41
target_sim_id=$(xcrun simctl list devices available | grep "iPhone 14" | cut -d "(" -f2 | cut -d ")" -f1 | head -n 1)
43
46
npm install -g appium
44
47
npm ci
45
48
npm run build
46
- appium driver run xcuitest build-wda
49
+ appium driver run xcuitest build-wda
47
50
wda=$(ls -d /Users/distiller/Library/Developer/Xcode/DerivedData/WebDriverAgent*)
48
51
echo $wda
49
52
echo 'export WDA_PATH=$wda' >> $BASH_ENV
@@ -52,15 +55,68 @@ jobs:
52
55
xcrun simctl install $target_sim_id $wda/Build/Products/Debug-iphonesimulator/WebDriverAgentRunner-Runner.app
53
56
xcrun simctl launch $target_sim_id "com.facebook.WebDriverAgentRunner.xctrunner"
54
57
mkdir appium-logs
55
- UDID=$target_sim_id APP_PATH=$ios_app npm run wdio-ios
58
+ git clone https://github.com/AppiumTestDistribution/flutter-finder.git
59
+ UDID=$target_sim_id APP_PATH=$ios_app npm run wdio-ios-ci
56
60
57
61
- store_artifacts :
58
62
path : appium-logs
63
+ JAVA_IOS :
64
+ # Specify the execution environment.
65
+ # See: https://circleci.com/docs/executor-intro/ & https://circleci.com/docs/configuration-reference/#executor-job
66
+ # Add steps to the job
67
+ # See: https://circleci.com/docs/jobs-steps/#steps-overview & https://circleci.com/docs/configuration-reference/#steps
68
+ macos :
69
+ # Specify the Xcode version you desire here
70
+ # See: https://circleci.com/docs/using-macos/
71
+ xcode : 15.2.0
72
+ steps :
73
+ # Checkout the code as the first step.
74
+ - checkout
75
+ - run : xcrun simctl list devices available
76
+ - run :
77
+ name : Node Version
78
+ command : |
79
+ nvm install v20.2.0 && nvm alias default 20.2.0
80
+ - run :
81
+ name : Install Appium and Run iOS Test
82
+ command : |
83
+ release_info=$(curl -s https://api.github.com/repos/AppiumTestDistribution/appium-flutter-server/releases/latest)
84
+ asset_urls=$(echo "$release_info" | grep "browser_download_url" | cut -d '"' -f 4)
85
+ ios_app=$(echo "$asset_urls" | tail -n 1)
86
+ echo "$ios_app"
87
+ curl -LO $ios_app
88
+ echo 'export APP_PATH=$CIRCLE_WORKING_DIRECTORY/ios.zip' >> $BASH_ENV
89
+ echo $APP_PATH
90
+ nvm install v20.2.0 && nvm alias default 20.2.0
91
+ node -v
92
+ target_sim_id=$(xcrun simctl list devices available | grep "iPhone 14" | cut -d "(" -f2 | cut -d ")" -f1 | head -n 1)
93
+ echo $target_sim_id
94
+ echo 'export UDID=$target_sim_id' >> $BASH_ENV
95
+ xcrun simctl boot $target_sim_id
96
+ xcrun simctl bootstatus $target_sim_id -b
97
+ npm install -g appium
98
+ npm ci
99
+ npm run build
100
+ appium driver run xcuitest build-wda
101
+ wda=$(ls -d /Users/distiller/Library/Developer/Xcode/DerivedData/WebDriverAgent*)
102
+ echo $wda
103
+ echo 'export WDA_PATH=$wda' >> $BASH_ENV
104
+ echo ${WDA_PATH}
105
+ echo ${PROJECT_ENV_VAR}
106
+ xcrun simctl install $target_sim_id $wda/Build/Products/Debug-iphonesimulator/WebDriverAgentRunner-Runner.app
107
+ xcrun simctl launch $target_sim_id "com.facebook.WebDriverAgentRunner.xctrunner"
108
+ mkdir appium-logs
109
+ git clone https://github.com/AppiumTestDistribution/flutter-finder.git
110
+ cd flutter-finder/flutter-by/java
111
+ UDID=$target_sim_id APP_PATH=$ios_app Platform=ios ./gradlew clean test --debug
59
112
113
+ - store_artifacts :
114
+ path : flutter-finder/flutter-by/java/appium.log
60
115
# Orchestrate jobs using workflows
61
116
# See: https://circleci.com/docs/workflows/ & https://circleci.com/docs/configuration-reference/#workflows
62
117
workflows :
63
118
ios : # This is the name of the workflow, feel free to change it to better match your workflow.
64
119
# Inside the workflow, you define the jobs you want to run.
65
120
jobs :
66
- - build
121
+ - WDIO_IOS
122
+ - JAVA_IOS
0 commit comments