Skip to content

Commit 3a8fb4c

Browse files
author
The Debuggernaut
committed
fix: updated workflow to use ts files
1 parent 4009ec0 commit 3a8fb4c

File tree

2 files changed

+3
-66
lines changed

2 files changed

+3
-66
lines changed

.github/workflows/ios-regression.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -202,9 +202,8 @@ jobs:
202202
- name: Start simulators
203203
shell: bash
204204
run: |
205-
source ./scripts/ci.sh
206-
stop_simulators_from_env_iOS
207-
start_simulators_from_env_iOS
205+
yarn tsc scripts/stop_ios.ts && node scripts/stop_ios.js
206+
yarn tsc scripts/start_ios.ts && node scripts/start_ios.js
208207
- name: List all tests
209208
run: |
210209
cd forked-session-appium
@@ -221,5 +220,4 @@ jobs:
221220
continue-on-error: true # just so we don't fail
222221
shell: bash
223222
run: |
224-
source ./scripts/ci.sh
225-
stop_simulators_from_env_iOS
223+
yarn tsc scripts/stop_ios.ts && node scripts/stop_ios.js

scripts/ci.sh

Lines changed: 0 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -98,68 +98,7 @@ function start_with_snapshots() {
9898
done
9999
}
100100

101-
# iOS functions
102-
103-
SIMULATOR_DEVICE="iPhone 15 Pro Max"
104-
SIMULATOR_OS="18.2"
105-
106-
# Function to boot simulators from environment variables
107-
function start_simulators_from_env_iOS() {
108-
echo "Starting iOS simulators from environment variables"
109-
110-
111-
for i in {1..12}; do
112-
simulator_label=$i
113-
env_var="IOS_${simulator_label}_SIMULATOR"
114-
simulator_udid=$(printenv "$env_var")
115-
116-
echo "Iteration $i: Label: $simulator_label, Env var: $env_var, UDID: $simulator_udid"
117-
118-
if [[ -n "$simulator_udid" ]]; then
119-
120-
echo "Booting $simulator_label simulator: $simulator_udid"
121-
boot_output=$(xcrun simctl boot "$simulator_udid" 2>&1)
122-
boot_status=$?
123-
echo "Boot command output: $boot_output"
124-
echo "Boot command exit code: $boot_status"
125-
if [[ $boot_status -ne 0 ]]; then
126-
echo "Error: Boot command failed for $simulator_udid"
127-
return 101
128-
fi
129-
sleep 5
130-
131-
booted=$(xcrun simctl list devices booted | grep "$simulator_udid")
132-
echo "Post-boot status for $simulator_udid: $booted"
133-
if [[ -z "$booted" ]]; then
134-
echo "Error: Simulator $simulator_udid did not boot successfully."
135-
return 102
136-
fi
137-
else
138-
echo "Error: $simulator_label simulator (env var $env_var) is not set"
139-
return 104
140-
fi
141-
done
142-
143-
echo "Opening iOS Simulator app..."
144-
open -a Simulator
145-
146-
}
147-
148-
149101

150102

151103

152-
# Function to start the Appium server
153-
function start_appium_server() {
154-
echo "Starting Appium server..."
155-
cd forked-session-appium || return 110
156-
start-server
157-
}
158-
159-
# Function to stop running simulators
160-
function stop_simulators_from_env_iOS() {
161-
echo "Stopping iOS simulators from environment variables..."
162-
xcrun simctl shutdown "all"
163-
}
164-
165104
set +x

0 commit comments

Comments
 (0)