From b50aa2ecc15031f4bd05fdafd681a03aa17b243d Mon Sep 17 00:00:00 2001 From: Mykola Mokhnach Date: Thu, 28 Nov 2024 13:00:10 +0100 Subject: [PATCH] ci: Bump macos version (#2480) --- .github/workflows/functional-test.yml | 40 +++++++++++++----------- package.json | 2 +- test/functional/basic/basic-e2e-specs.js | 2 +- test/functional/basic/find-e2e-specs.js | 4 +-- 4 files changed, 26 insertions(+), 22 deletions(-) diff --git a/.github/workflows/functional-test.yml b/.github/workflows/functional-test.yml index 4d6f51668..e7814395f 100644 --- a/.github/workflows/functional-test.yml +++ b/.github/workflows/functional-test.yml @@ -21,6 +21,7 @@ env: jobs: build: + # https://github.com/actions/runner-images/tree/main/images/macos strategy: matrix: e2eRoot: @@ -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 @@ -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 @@ -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 \ @@ -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" diff --git a/package.json b/package.json index c6e3697cb..3388a2652 100644 --- a/package.json +++ b/package.json @@ -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" diff --git a/test/functional/basic/basic-e2e-specs.js b/test/functional/basic/basic-e2e-specs.js index 8570dedef..1b6328696 100644 --- a/test/functional/basic/basic-e2e-specs.js +++ b/test/functional/basic/basic-e2e-specs.js @@ -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; diff --git a/test/functional/basic/find-e2e-specs.js b/test/functional/basic/find-e2e-specs.js index 3b0e19d76..269676911 100644 --- a/test/functional/basic/find-e2e-specs.js +++ b/test/functional/basic/find-e2e-specs.js @@ -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'); @@ -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');