Skip to content

Commit

Permalink
ci: use macos14 for functional test (#901)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
KazuCocoa committed May 14, 2024
1 parent 130352c commit 4236dc5
Showing 1 changed file with 30 additions and 13 deletions.
43 changes: 30 additions & 13 deletions .github/workflows/functional-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,35 +2,52 @@ 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
with:
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}}

0 comments on commit 4236dc5

Please sign in to comment.