Skip to content

Commit

Permalink
ci: Bump macos version (#2480)
Browse files Browse the repository at this point in the history
  • Loading branch information
mykola-mokhnach authored Nov 28, 2024
1 parent 65fa444 commit b50aa2e
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 22 deletions.
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 package.json
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@
"ts-node": "^10.9.1",
"type-fest": "^4.1.0",
"typescript": "^5.4.2",
"webdriverio": "^9.0.6"
"webdriverio": "^9.4.1"
},
"overrides": {
"http-cache-semantics": "4.1.1"
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 });
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

0 comments on commit b50aa2e

Please sign in to comment.