@@ -8,64 +8,59 @@ 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 :
12- # Specify the execution environment.
13- # See: https://circleci.com/docs/executor-intro/ & https://circleci.com/docs/configuration-reference/#executor-job
14- macos :
15- # Specify the Xcode version you desire here
16- # See: https://circleci.com/docs/using-macos/
17- xcode : 15.2.0
11+ build :
12+ # Specify the execution environment.
13+ # See: https://circleci.com/docs/executor-intro/ & https://circleci.com/docs/configuration-reference/#executor-job
14+ macos :
15+ # Specify the Xcode version you desire here
16+ # See: https://circleci.com/docs/using-macos/
17+ xcode : 15.2.0
1818
19- # Add steps to the job
20- # See: https://circleci.com/docs/jobs-steps/#steps-overview & https://circleci.com/docs/configuration-reference/#steps
21- steps :
22- # Checkout the code as the first step.
23- - checkout
24- - run : xcrun simctl list devices available
25- - run :
26- name : Node Version
27- command : |
28- nvm install v20.2.0 && nvm alias default 20.2.0
29- - run :
30- name : Install Appium and Run iOS Test
31- command : |
32- release_info=$(curl -s https://api.github.com/repos/AppiumTestDistribution/appium-flutter-server/releases/latest)
33- asset_urls=$(echo "$release_info" | grep "browser_download_url" | cut -d '"' -f 4)
34- ios_app=$(echo "$asset_urls" | tail -n 1)
35- echo "$ios_app"
36- nvm install v20.2.0 && nvm alias default 20.2.0
37- node -v
38- target_sim_id=$(xcrun simctl list devices available | grep "iPhone 14" | cut -d "(" -f2 | cut -d ")" -f1 | head -n 1)
39- echo $target_sim_id
40- echo 'export UDID=$target_sim_id' >> $BASH_ENV
41- xcrun simctl boot $target_sim_id
42- xcrun simctl bootstatus $target_sim_id -b
43- npm install -g appium
44- npm ci
45- npm run build
46- appium driver run xcuitest build-wda
47- wda=$(ls -d /Users/distiller/Library/Developer/Xcode/DerivedData/WebDriverAgent*)
48- echo $wda
49- echo 'export WDA_PATH=$wda' >> $BASH_ENV
50- echo ${WDA_PATH}
51- echo ${PROJECT_ENV_VAR}
52- xcrun simctl install $target_sim_id $wda/Build/Products/Debug-iphonesimulator/WebDriverAgentRunner-Runner.app
53- xcrun simctl launch $target_sim_id "com.facebook.WebDriverAgentRunner.xctrunner"
54- mkdir appium-logs
55- UDID=$target_sim_id APP_PATH=$ios_app npm run wdio-ios
19+ # Add steps to the job
20+ # See: https://circleci.com/docs/jobs-steps/#steps-overview & https://circleci.com/docs/configuration-reference/#steps
21+ steps :
22+ # Checkout the code as the first step.
23+ - checkout
24+ - run : xcrun simctl list devices available
25+ - run :
26+ name : Node Version
27+ command : |
28+ nvm install v20.2.0 && nvm alias default 20.2.0
29+ - run :
30+ name : Install Appium and Run iOS Test
31+ command : |
32+ release_info=$(curl -s https://api.github.com/repos/AppiumTestDistribution/appium-flutter-server/releases/latest)
33+ asset_urls=$(echo "$release_info" | grep "browser_download_url" | cut -d '"' -f 4)
34+ ios_app=$(echo "$asset_urls" | tail -n 1)
35+ echo "$ios_app"
36+ nvm install v20.2.0 && nvm alias default 20.2.0
37+ node -v
38+ target_sim_id=$(xcrun simctl list devices available | grep "iPhone 14" | cut -d "(" -f2 | cut -d ")" -f1 | head -n 1)
39+ echo $target_sim_id
40+ echo 'export UDID=$target_sim_id' >> $BASH_ENV
41+ xcrun simctl boot $target_sim_id
42+ xcrun simctl bootstatus $target_sim_id -b
43+ npm install -g appium
44+ npm ci
45+ npm run build
46+ appium driver run xcuitest build-wda
47+ wda=$(ls -d /Users/distiller/Library/Developer/Xcode/DerivedData/WebDriverAgent*)
48+ echo $wda
49+ echo 'export WDA_PATH=$wda' >> $BASH_ENV
50+ echo ${WDA_PATH}
51+ echo ${PROJECT_ENV_VAR}
52+ xcrun simctl install $target_sim_id $wda/Build/Products/Debug-iphonesimulator/WebDriverAgentRunner-Runner.app
53+ xcrun simctl launch $target_sim_id "com.facebook.WebDriverAgentRunner.xctrunner"
54+ mkdir appium-logs
55+ UDID=$target_sim_id APP_PATH=$ios_app npm run wdio-ios
5656
57- # Collect XML test results data to show in the UI, and save the same XML
58- # files under test-results folder in the Artifacts tab
59- - store_test_results :
60- path : test_output
61- - store_artifacts :
62- path : test_output
63- destination : scan-output
57+ - store_artifacts :
58+ path : appium-logs
6459
6560# Orchestrate jobs using workflows
6661# See: https://circleci.com/docs/workflows/ & https://circleci.com/docs/configuration-reference/#workflows
6762workflows :
68- ios : # This is the name of the workflow, feel free to change it to better match your workflow.
69- # Inside the workflow, you define the jobs you want to run.
70- jobs :
71- - build
63+ ios : # This is the name of the workflow, feel free to change it to better match your workflow.
64+ # Inside the workflow, you define the jobs you want to run.
65+ jobs :
66+ - build
0 commit comments