-
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c943ac1
commit fb2c0cb
Showing
2 changed files
with
77 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,66 +1,66 @@ | ||
# Use the latest 2.1 version of CircleCI pipeline process engine. | ||
# See: https://circleci.com/docs/configuration-reference | ||
|
||
# For a detailed guide to building and testing on iOS, read the docs: | ||
# https://circleci.com/docs/testing-ios/ | ||
version: 2.1 | ||
|
||
# Define a job to be invoked later in a workflow. | ||
# See: https://circleci.com/docs/jobs-steps/#jobs-overview & https://circleci.com/docs/configuration-reference/#jobs | ||
jobs: | ||
build: | ||
# Specify the execution environment. | ||
# See: https://circleci.com/docs/executor-intro/ & https://circleci.com/docs/configuration-reference/#executor-job | ||
macos: | ||
# Specify the Xcode version you desire here | ||
# See: https://circleci.com/docs/using-macos/ | ||
xcode: 15.2.0 | ||
|
||
# Add steps to the job | ||
# See: https://circleci.com/docs/jobs-steps/#steps-overview & https://circleci.com/docs/configuration-reference/#steps | ||
steps: | ||
# Checkout the code as the first step. | ||
- checkout | ||
- run: xcrun simctl list devices available | ||
- run: | ||
name: Node Version | ||
command: | | ||
nvm install v20.2.0 && nvm alias default 20.2.0 | ||
- run: | ||
name: Install Appium and Run iOS Test | ||
command: | | ||
release_info=$(curl -s https://api.github.com/repos/AppiumTestDistribution/appium-flutter-server/releases/latest) | ||
asset_urls=$(echo "$release_info" | grep "browser_download_url" | cut -d '"' -f 4) | ||
ios_app=$(echo "$asset_urls" | tail -n 1) | ||
echo "$ios_app" | ||
nvm install v20.2.0 && nvm alias default 20.2.0 | ||
node -v | ||
target_sim_id=$(xcrun simctl list devices available | grep "iPhone 14" | cut -d "(" -f2 | cut -d ")" -f1 | head -n 1) | ||
echo $target_sim_id | ||
echo 'export UDID=$target_sim_id' >> $BASH_ENV | ||
xcrun simctl boot $target_sim_id | ||
xcrun simctl bootstatus $target_sim_id -b | ||
npm install -g appium | ||
npm ci | ||
npm run build | ||
appium driver run xcuitest build-wda | ||
wda=$(ls -d /Users/distiller/Library/Developer/Xcode/DerivedData/WebDriverAgent*) | ||
echo $wda | ||
echo 'export WDA_PATH=$wda' >> $BASH_ENV | ||
echo ${WDA_PATH} | ||
echo ${PROJECT_ENV_VAR} | ||
xcrun simctl install $target_sim_id $wda/Build/Products/Debug-iphonesimulator/WebDriverAgentRunner-Runner.app | ||
xcrun simctl launch $target_sim_id "com.facebook.WebDriverAgentRunner.xctrunner" | ||
mkdir appium-logs | ||
UDID=$target_sim_id APP_PATH=$ios_app npm run wdio-ios | ||
- store_artifacts: | ||
path: appium-logs | ||
|
||
# Orchestrate jobs using workflows | ||
# See: https://circleci.com/docs/workflows/ & https://circleci.com/docs/configuration-reference/#workflows | ||
workflows: | ||
ios: # This is the name of the workflow, feel free to change it to better match your workflow. | ||
# Inside the workflow, you define the jobs you want to run. | ||
jobs: | ||
- build | ||
## Use the latest 2.1 version of CircleCI pipeline process engine. | ||
## See: https://circleci.com/docs/configuration-reference | ||
# | ||
## For a detailed guide to building and testing on iOS, read the docs: | ||
## https://circleci.com/docs/testing-ios/ | ||
#version: 2.1 | ||
# | ||
## Define a job to be invoked later in a workflow. | ||
## See: https://circleci.com/docs/jobs-steps/#jobs-overview & https://circleci.com/docs/configuration-reference/#jobs | ||
#jobs: | ||
# build: | ||
# # Specify the execution environment. | ||
# # See: https://circleci.com/docs/executor-intro/ & https://circleci.com/docs/configuration-reference/#executor-job | ||
# macos: | ||
# # Specify the Xcode version you desire here | ||
# # See: https://circleci.com/docs/using-macos/ | ||
# xcode: 15.2.0 | ||
# | ||
# # Add steps to the job | ||
# # See: https://circleci.com/docs/jobs-steps/#steps-overview & https://circleci.com/docs/configuration-reference/#steps | ||
# steps: | ||
# # Checkout the code as the first step. | ||
# - checkout | ||
# - run: xcrun simctl list devices available | ||
# - run: | ||
# name: Node Version | ||
# command: | | ||
# nvm install v20.2.0 && nvm alias default 20.2.0 | ||
# - run: | ||
# name: Install Appium and Run iOS Test | ||
# command: | | ||
# release_info=$(curl -s https://api.github.com/repos/AppiumTestDistribution/appium-flutter-server/releases/latest) | ||
# asset_urls=$(echo "$release_info" | grep "browser_download_url" | cut -d '"' -f 4) | ||
# ios_app=$(echo "$asset_urls" | tail -n 1) | ||
# echo "$ios_app" | ||
# nvm install v20.2.0 && nvm alias default 20.2.0 | ||
# node -v | ||
# target_sim_id=$(xcrun simctl list devices available | grep "iPhone 14" | cut -d "(" -f2 | cut -d ")" -f1 | head -n 1) | ||
# echo $target_sim_id | ||
# echo 'export UDID=$target_sim_id' >> $BASH_ENV | ||
# xcrun simctl boot $target_sim_id | ||
# xcrun simctl bootstatus $target_sim_id -b | ||
# npm install -g appium | ||
# npm ci | ||
# npm run build | ||
# appium driver run xcuitest build-wda | ||
# wda=$(ls -d /Users/distiller/Library/Developer/Xcode/DerivedData/WebDriverAgent*) | ||
# echo $wda | ||
# echo 'export WDA_PATH=$wda' >> $BASH_ENV | ||
# echo ${WDA_PATH} | ||
# echo ${PROJECT_ENV_VAR} | ||
# xcrun simctl install $target_sim_id $wda/Build/Products/Debug-iphonesimulator/WebDriverAgentRunner-Runner.app | ||
# xcrun simctl launch $target_sim_id "com.facebook.WebDriverAgentRunner.xctrunner" | ||
# mkdir appium-logs | ||
# UDID=$target_sim_id APP_PATH=$ios_app npm run wdio-ios | ||
# | ||
# - store_artifacts: | ||
# path: appium-logs | ||
# | ||
## Orchestrate jobs using workflows | ||
## See: https://circleci.com/docs/workflows/ & https://circleci.com/docs/configuration-reference/#workflows | ||
#workflows: | ||
# ios: # This is the name of the workflow, feel free to change it to better match your workflow. | ||
# # Inside the workflow, you define the jobs you want to run. | ||
# jobs: | ||
# - build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters