@@ -8,15 +8,14 @@ version: 2.1
88# Define a job to be invoked later in a workflow.
99# See: https://circleci.com/docs/jobs-steps/#jobs-overview & https://circleci.com/docs/configuration-reference/#jobs
1010jobs :
11- build :
11+ WDIO_IOS :
1212 # 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/
1717 xcode : 15.2.0
1818
19- # Add steps to the job
2019 # See: https://circleci.com/docs/jobs-steps/#steps-overview & https://circleci.com/docs/configuration-reference/#steps
2120 steps :
2221 # Checkout the code as the first step.
3332 asset_urls=$(echo "$release_info" | grep "browser_download_url" | cut -d '"' -f 4)
3433 ios_app=$(echo "$asset_urls" | tail -n 1)
3534 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
3639 nvm install v20.2.0 && nvm alias default 20.2.0
3740 node -v
3841 target_sim_id=$(xcrun simctl list devices available | grep "iPhone 14" | cut -d "(" -f2 | cut -d ")" -f1 | head -n 1)
4346 npm install -g appium
4447 npm ci
4548 npm run build
46- appium driver run xcuitest build-wda
49+ appium driver run xcuitest build-wda
4750 wda=$(ls -d /Users/distiller/Library/Developer/Xcode/DerivedData/WebDriverAgent*)
4851 echo $wda
4952 echo 'export WDA_PATH=$wda' >> $BASH_ENV
@@ -52,15 +55,68 @@ jobs:
5255 xcrun simctl install $target_sim_id $wda/Build/Products/Debug-iphonesimulator/WebDriverAgentRunner-Runner.app
5356 xcrun simctl launch $target_sim_id "com.facebook.WebDriverAgentRunner.xctrunner"
5457 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
5660
5761 - store_artifacts :
5862 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
59112
113+ - store_artifacts :
114+ path : flutter-finder/flutter-by/java/appium.log
60115# Orchestrate jobs using workflows
61116# See: https://circleci.com/docs/workflows/ & https://circleci.com/docs/configuration-reference/#workflows
62117workflows :
63118 ios : # This is the name of the workflow, feel free to change it to better match your workflow.
64119 # Inside the workflow, you define the jobs you want to run.
65120 jobs :
66- - build
121+ - WDIO_IOS
122+ - JAVA_IOS
0 commit comments