Skip to content

Commit c32644b

Browse files
ci: update functional-test.yml to boot simulator (#416)
* ci: update functional-test.yml to boot simulator * Update functional-test.yml * Update functional-test.yml * use 127.0.0.1 insteaf of localhost * keep the macos 14 env since the xcode/simulator might be bad * try macos 15 * try ios 17.0 * delete older platform --------- Co-authored-by: Mykola Mokhnach <mokhnach@gmail.com>
1 parent fcb6f86 commit c32644b

File tree

2 files changed

+15
-16
lines changed

2 files changed

+15
-16
lines changed

.github/workflows/functional-test.yml

+14-15
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,11 @@ jobs:
1111
strategy:
1212
matrix:
1313
include:
14-
- os: macos-14
15-
xcode: '15.2'
16-
ios: '17.2'
17-
device: iPhone 15
18-
- os: macos-13
19-
xcode: '14.3.1'
20-
ios: '16.4'
21-
device: iPhone 14
14+
- os: macos-15
15+
xcode: '16.2'
16+
ios: '18.2'
17+
device: iPhone 16
18+
fail-fast: false
2219
runs-on: ${{ matrix.os }}
2320
env:
2421
PLATFORM_VERSION: ${{ matrix.ios }}
@@ -31,18 +28,20 @@ jobs:
3128
- uses: actions/checkout@v3
3229
- uses: maxim-lobanov/setup-xcode@v1
3330
with:
34-
xcode-version: ${{ env.XCODE_VERSION }}
31+
xcode-version: ${{ matrix.xcode }}
3532
- run: xcrun simctl list
3633
- uses: actions/setup-node@v3
3734
with:
3835
node-version: lts/*
3936
check-latest: true
4037
- name: Prepare iOS simulator
41-
run: |
42-
open -Fn "$(xcode-select -p)/Applications/Simulator.app"
43-
udid=$(xcrun simctl list devices available -j | \
44-
node -p "Object.entries(JSON.parse(fs.readFileSync(0)).devices).filter((x) => x[0].includes('$PLATFORM_VERSION'.replace('.', '-'))).reduce((acc, x) => [...acc, ...x[1]], []).find(({name}) => name === '$DEVICE_NAME').udid")
45-
xcrun simctl bootstatus $udid -b
46-
xcrun simctl openurl $udid "https://google.com" &
38+
id: prepareSimulator
39+
uses: futureware-tech/simulator-action@v4
40+
with:
41+
model: "${{ matrix.device }}"
42+
os_version: "${{ matrix.ios }}"
43+
shutdown_after_job: false
44+
wait_for_boot: true
45+
- run: xcrun simctl openurl booted "https://google.com" &
4746
- run: npm install
4847
- run: npm run e2e-test

test/functional/safari-e2e-specs.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ describe('Safari remote debugger', function () {
5858
await sim.run({
5959
startupTimeout: process.env.CI ? 600000 : 120000,
6060
});
61-
address = `http://localhost:${await portPromise}`;
61+
address = `http://127.0.0.1:${await portPromise}`;
6262
});
6363
after(async function () {
6464
await sim.shutdown();

0 commit comments

Comments
 (0)