Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Bump macos version #2480

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 22 additions & 18 deletions .github/workflows/functional-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ env:
jobs:
build:

# https://github.com/actions/runner-images/tree/main/images/macos
strategy:
matrix:
e2eRoot:
Expand All @@ -29,26 +30,26 @@ jobs:
- driver
- web
- long
xcodeVersion: ['13.4', '14.2']
xcodeVersion: ['14.3.1', '15.4']
include:
- xcodeVersion: '13.4'
iosVersion: '15.5'
deviceName: 'iPhone 12'
tvosVersion: '15.4'
- xcodeVersion: '14.3.1'
iosVersion: '16.4'
deviceName: 'iPhone 14'
tvosVersion: '16.4'
tvosDeviceName: 'Apple TV'
platform: macos-12
- xcodeVersion: '14.2'
iosVersion: '16.2'
deviceName: 'iPhone 13'
platform: macos-13
- xcodeVersion: '15.4'
iosVersion: '17.5'
deviceName: 'iPhone 15'
skipTvOs: true
platform: macos-12
platform: macos-14
fail-fast: false

runs-on: ${{ matrix.platform }}

name: e2e
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Install Node.js
uses: actions/setup-node@v3
Expand All @@ -67,6 +68,15 @@ jobs:
xcrun simctl list runtimes
xcrun --sdk iphonesimulator --show-sdk-version
name: List Runtimes
- name: Prepare iOS simulator
id: prepareSimulator
uses: futureware-tech/simulator-action@v3
with:
model: "${{ matrix.deviceName }}"
os_version: "${{ matrix.iosVersion }}"
shutdown_after_job: false
- run: xcrun simctl bootstatus ${{ steps.prepareSimulator.outputs.udid }} -b
name: Wait for Simulator to finish booting

- run: |
npm install --no-save mjpeg-consumer
Expand All @@ -77,7 +87,7 @@ jobs:
npm install -g appium
appium driver install --source=local "$cwd"
appium driver doctor xcuitest
appium driver run xcuitest build-wda
appium driver run xcuitest build-wda --sdk=${{ matrix.iosVersion }} --name="${{ matrix.deviceName }}"
echo "Starting Appium server on $APPIUM_TEST_SERVER_HOST:$APPIUM_TEST_SERVER_PORT"
nohup appium server \
--port=$APPIUM_TEST_SERVER_PORT \
Expand All @@ -89,12 +99,6 @@ jobs:
cat appium.log
name: Prepare the server

- run: |
target_sim_id=$(xcrun simctl list devices available | grep "${{ matrix.deviceName }} (" | cut -d "(" -f2 | cut -d ")" -f1)
open -Fn "$(xcode-select -p)/Applications/Simulator.app"
xcrun simctl bootstatus $target_sim_id -b
name: Preboot ${{ matrix.deviceName }}

- run: |
if ! nc -z $APPIUM_TEST_SERVER_HOST $APPIUM_TEST_SERVER_PORT; then
echo "Appium server is still not listening at $APPIUM_TEST_SERVER_HOST:$APPIUM_TEST_SERVER_PORT"
Expand Down
2 changes: 1 addition & 1 deletion test/functional/basic/basic-e2e-specs.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ describe('XCUITestDriver - basics -', function () {
});

it('should return status immediately if another operation is in progress', async function () {
await driver.setImplicitTimeout(10000);
await driver.setTimeout({ 'implicit': 10000 });
mykola-mokhnach marked this conversation as resolved.
Show resolved Hide resolved
const findElementPromise = driver.$('#WrongLocator');
const status = await driver.status();
status.build.version.should.exist;
Expand Down
4 changes: 2 additions & 2 deletions test/functional/basic/find-e2e-specs.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ describe('XCUITestDriver - find -', function () {
// we will have the previous elements, so the get command will be fulfilled.
await B.delay(1000);

await driver.setImplicitTimeout(5000);
await driver.setTimeout({ 'implicit': 5000 });
table = await driver.$('XCUIElementTypeTable');
let el2 = await driver.$('XCUIElementTypeStaticText');
let el2Name = await el2.getAttribute('name');
Expand Down Expand Up @@ -157,7 +157,7 @@ describe('XCUITestDriver - find -', function () {
});

it('should respect implicit wait', async function () {
await driver.setImplicitTimeout(5000);
await driver.setTimeout({ 'implicit': 5000 });

let begin = Date.now();
const el = await driver.$('//something_not_there');
Expand Down
Loading