1- # Use the latest 2.1 version of CircleCI pipeline process engine.
2- # See: https://circleci.com/docs/configuration-reference
1+ # # Use the latest 2.1 version of CircleCI pipeline process engine.
2+ # # See: https://circleci.com/docs/configuration-reference
33
4- # For a detailed guide to building and testing on iOS, read the docs:
5- # https://circleci.com/docs/testing-ios/
6- on :
7- pull_request :
8- types : [opened, reopened]
9- version : 2.1
4+ # # For a detailed guide to building and testing on iOS, read the docs:
5+ # # https://circleci.com/docs/testing-ios/
6+ # on:
7+ # pull_request:
8+ # types: [opened, reopened]
9+ # version: 2.1
1010
11- # Define a job to be invoked later in a workflow.
12- # See: https://circleci.com/docs/jobs-steps/#jobs-overview & https://circleci.com/docs/configuration-reference/#jobs
13- jobs :
14- WDIO_IOS :
15- # Specify the execution environment.
16- # See: https://circleci.com/docs/executor-intro/ & https://circleci.com/docs/configuration-reference/#executor-job
17- macos :
18- # Specify the Xcode version you desire here
19- # See: https://circleci.com/docs/using-macos/
20- xcode : 15.2.0
21-
22- # See: https://circleci.com/docs/jobs-steps/#steps-overview & https://circleci.com/docs/configuration-reference/#steps
23- steps :
24- # Checkout the code as the first step.
25- - checkout
26- - run : xcrun simctl list devices available
27- - run :
28- name : Node Version
29- command : |
30- nvm install v22.2.0 && nvm alias default 22.2.0
31- - run :
32- name : Install Appium and Run iOS Test
33- command : |
34- release_info=$(curl -s https://api.github.com/repos/AppiumTestDistribution/appium-flutter-server/releases/latest)
35- asset_urls=$(echo "$release_info" | grep "browser_download_url" | cut -d '"' -f 4)
36- ios_app=$(echo "$asset_urls" | tail -n 1)
37- echo "$ios_app"
38- curl -LO $ios_app
39- echo 'export APP_PATH=$CIRCLE_WORKING_DIRECTORY/ios.zip' >> $BASH_ENV
40- echo $pwd
41- echo ls
42- nvm install v22.2.0 && nvm alias default 22.2.0
43- node -v
44- target_sim_id=$(xcrun simctl list devices available | grep "iPhone 14" | cut -d "(" -f2 | cut -d ")" -f1 | head -n 1)
45- echo $target_sim_id
46- echo 'export UDID=$target_sim_id' >> $BASH_ENV
47- xcrun simctl boot $target_sim_id
48- xcrun simctl bootstatus $target_sim_id -b
49- npm install -g appium
50- npm run build-flutter-by-service
51- npm install --no-package-lock
52- npm run build
53- appium driver list
54- appium driver run xcuitest build-wda
55- wda=$(ls -d /Users/distiller/Library/Developer/Xcode/DerivedData/WebDriverAgent*)
56- echo $wda
57- echo 'export WDA_PATH=$wda' >> $BASH_ENV
58- echo ${WDA_PATH}
59- echo ${PROJECT_ENV_VAR}
60- xcrun simctl install $target_sim_id $wda/Build/Products/Debug-iphonesimulator/WebDriverAgentRunner-Runner.app
61- xcrun simctl launch $target_sim_id "com.facebook.WebDriverAgentRunner.xctrunner"
62- mkdir appium-logs
63- UDID=$target_sim_id APP_PATH=$ios_app npm run wdio-ios
64-
65- - store_artifacts :
66- path : appium-logs
67- # JAVA_IOS:
11+ # # Define a job to be invoked later in a workflow.
12+ # # See: https://circleci.com/docs/jobs-steps/#jobs-overview & https://circleci.com/docs/configuration-reference/#jobs
13+ # jobs:
14+ # WDIO_IOS:
6815# # Specify the execution environment.
6916# # See: https://circleci.com/docs/executor-intro/ & https://circleci.com/docs/configuration-reference/#executor-job
70- # # Add steps to the job
71- # # See: https://circleci.com/docs/jobs-steps/#steps-overview & https://circleci.com/docs/configuration-reference/#steps
7217# macos:
7318# # Specify the Xcode version you desire here
7419# # See: https://circleci.com/docs/using-macos/
7520# xcode: 15.2.0
21+
22+ # # See: https://circleci.com/docs/jobs-steps/#steps-overview & https://circleci.com/docs/configuration-reference/#steps
7623# steps:
7724# # Checkout the code as the first step.
7825# - checkout
@@ -90,15 +37,17 @@ jobs:
9037# echo "$ios_app"
9138# curl -LO $ios_app
9239# echo 'export APP_PATH=$CIRCLE_WORKING_DIRECTORY/ios.zip' >> $BASH_ENV
93- # echo $APP_PATH
40+ # echo $pwd
41+ # echo ls
9442# nvm install v22.2.0 && nvm alias default 22.2.0
9543# node -v
9644# target_sim_id=$(xcrun simctl list devices available | grep "iPhone 14" | cut -d "(" -f2 | cut -d ")" -f1 | head -n 1)
9745# echo $target_sim_id
9846# echo 'export UDID=$target_sim_id' >> $BASH_ENV
9947# xcrun simctl boot $target_sim_id
10048# xcrun simctl bootstatus $target_sim_id -b
101- # npm install -g appium@2.19.0
49+ # npm install -g appium
50+ # npm run build-flutter-by-service
10251# npm install --no-package-lock
10352# npm run build
10453# appium driver list
@@ -111,25 +60,76 @@ jobs:
11160# xcrun simctl install $target_sim_id $wda/Build/Products/Debug-iphonesimulator/WebDriverAgentRunner-Runner.app
11261# xcrun simctl launch $target_sim_id "com.facebook.WebDriverAgentRunner.xctrunner"
11362# mkdir appium-logs
114- # git clone https://github.com/AppiumTestDistribution/flutter-finder.git
115- # cd flutter-finder/flutter-by/java
116- # UDID=$target_sim_id APP_PATH=$ios_app Platform=ios ./gradlew clean test --debug
63+ # UDID=$target_sim_id APP_PATH=$ios_app npm run wdio-ios
11764
11865# - store_artifacts:
119- # path: flutter-finder/flutter-by/java/appium.log
120- # # Orchestrate jobs using workflows
121- # # See: https://circleci.com/docs/workflows/ & https://circleci.com/docs/configuration-reference/#workflows
122- workflows :
123- ios : # This is the name of the workflow, feel free to change it to better match your workflow.
124- # Inside the workflow, you define the jobs you want to run.
125- jobs :
126- - WDIO_IOS :
127- filters :
128- branches :
129- ignore :
130- - main
131- # - JAVA_IOS:
132- # filters:
133- # branches:
134- # ignore:
135- # - main
66+ # path: appium-logs
67+ # # JAVA_IOS:
68+ # # # Specify the execution environment.
69+ # # # See: https://circleci.com/docs/executor-intro/ & https://circleci.com/docs/configuration-reference/#executor-job
70+ # # # Add steps to the job
71+ # # # See: https://circleci.com/docs/jobs-steps/#steps-overview & https://circleci.com/docs/configuration-reference/#steps
72+ # # macos:
73+ # # # Specify the Xcode version you desire here
74+ # # # See: https://circleci.com/docs/using-macos/
75+ # # xcode: 15.2.0
76+ # # steps:
77+ # # # Checkout the code as the first step.
78+ # # - checkout
79+ # # - run: xcrun simctl list devices available
80+ # # - run:
81+ # # name: Node Version
82+ # # command: |
83+ # # nvm install v22.2.0 && nvm alias default 22.2.0
84+ # # - run:
85+ # # name: Install Appium and Run iOS Test
86+ # # command: |
87+ # # release_info=$(curl -s https://api.github.com/repos/AppiumTestDistribution/appium-flutter-server/releases/latest)
88+ # # asset_urls=$(echo "$release_info" | grep "browser_download_url" | cut -d '"' -f 4)
89+ # # ios_app=$(echo "$asset_urls" | tail -n 1)
90+ # # echo "$ios_app"
91+ # # curl -LO $ios_app
92+ # # echo 'export APP_PATH=$CIRCLE_WORKING_DIRECTORY/ios.zip' >> $BASH_ENV
93+ # # echo $APP_PATH
94+ # # nvm install v22.2.0 && nvm alias default 22.2.0
95+ # # node -v
96+ # # target_sim_id=$(xcrun simctl list devices available | grep "iPhone 14" | cut -d "(" -f2 | cut -d ")" -f1 | head -n 1)
97+ # # echo $target_sim_id
98+ # # echo 'export UDID=$target_sim_id' >> $BASH_ENV
99+ # # xcrun simctl boot $target_sim_id
100+ # # xcrun simctl bootstatus $target_sim_id -b
101+ # # npm install -g appium@2.19.0
102+ # # npm install --no-package-lock
103+ # # npm run build
104+ # # appium driver list
105+ # # appium driver run xcuitest build-wda
106+ # # wda=$(ls -d /Users/distiller/Library/Developer/Xcode/DerivedData/WebDriverAgent*)
107+ # # echo $wda
108+ # # echo 'export WDA_PATH=$wda' >> $BASH_ENV
109+ # # echo ${WDA_PATH}
110+ # # echo ${PROJECT_ENV_VAR}
111+ # # xcrun simctl install $target_sim_id $wda/Build/Products/Debug-iphonesimulator/WebDriverAgentRunner-Runner.app
112+ # # xcrun simctl launch $target_sim_id "com.facebook.WebDriverAgentRunner.xctrunner"
113+ # # mkdir appium-logs
114+ # # git clone https://github.com/AppiumTestDistribution/flutter-finder.git
115+ # # cd flutter-finder/flutter-by/java
116+ # # UDID=$target_sim_id APP_PATH=$ios_app Platform=ios ./gradlew clean test --debug
117+
118+ # # - store_artifacts:
119+ # # path: flutter-finder/flutter-by/java/appium.log
120+ # # # Orchestrate jobs using workflows
121+ # # # See: https://circleci.com/docs/workflows/ & https://circleci.com/docs/configuration-reference/#workflows
122+ # workflows:
123+ # ios: # This is the name of the workflow, feel free to change it to better match your workflow.
124+ # # Inside the workflow, you define the jobs you want to run.
125+ # jobs:
126+ # - WDIO_IOS:
127+ # filters:
128+ # branches:
129+ # ignore:
130+ # - main
131+ # # - JAVA_IOS:
132+ # # filters:
133+ # # branches:
134+ # # ignore:
135+ # # - main
0 commit comments