From 4236dc5323d6d16259898a2e419b438abd9f6b5a Mon Sep 17 00:00:00 2001 From: Kazuaki Matsuo Date: Tue, 14 May 2024 09:18:39 -0700 Subject: [PATCH] ci: use macos14 for functional test (#901) * ci: use newer instance * Update functional-test.yml * Update functional-test.yml * add matrix * move env * revert project changes * add cancel * ci: fix env place --- .github/workflows/functional-test.yml | 43 +++++++++++++++++++-------- 1 file changed, 30 insertions(+), 13 deletions(-) diff --git a/.github/workflows/functional-test.yml b/.github/workflows/functional-test.yml index e5c1ebad9..90bacdc9a 100644 --- a/.github/workflows/functional-test.yml +++ b/.github/workflows/functional-test.yml @@ -2,17 +2,25 @@ name: Functional Tests on: [pull_request] +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true jobs: test: - env: - CI: true - _FORCE_LOGS: 1 - XCODE_VERSION: 13.4 - DEVICE_NAME: iPhone 11 - PLATFORM_VERSION: 15.5 - # https://github.com/actions/runner-images/blob/main/images/macos/macos-12-Readme.md - runs-on: macos-12 + strategy: + fail-fast: false + matrix: + test_targets: + - XCODE_VERSION: 15.3 + IOS_VERSION: 17.4 + IOS_MODEL: iPhone 15 Plus + - XCODE_VERSION: 14.3.1 + IOS_VERSION: 16.4 + IOS_MODEL: iPhone 14 Plus + + # https://github.com/actions/runner-images/blob/main/images/macos/macos-14-Readme.md + runs-on: macos-14 steps: - uses: actions/checkout@v3 - uses: actions/setup-node@v3 @@ -20,17 +28,26 @@ jobs: node-version: lts/* - uses: maxim-lobanov/setup-xcode@v1 with: - xcode-version: "${{ env.XCODE_VERSION }}" + xcode-version: ${{matrix.test_targets.XCODE_VERSION}} - run: | npm install mkdir -p ./Resources/WebDriverAgent.bundle name: Install dev dependencies - - run: | - target_sim_id=$(xcrun simctl list devices available | grep "$DEVICE_NAME (" | cut -d "(" -f2 | cut -d ")" -f1) - open -Fn "$(xcode-select -p)/Applications/Simulator.app" - xcrun simctl bootstatus $target_sim_id -b + - uses: futureware-tech/simulator-action@v3 + with: + model: ${{matrix.test_targets.IOS_MODEL}} + os: iOS + os_version: ${{matrix.test_targets.IOS_VERSION}} + erase_before_boot: true + # to prevent unexpected shutdown failure error + shutdown_after_job: false name: Preboot Simulator - run: npm run e2e-test name: Run functional tests + env: + CI: true + _FORCE_LOGS: 1 + DEVICE_NAME: ${{matrix.test_targets.IOS_MODEL}} + PLATFORM_VERSION: ${{matrix.test_targets.IOS_VERSION}}