From 5e66a38bffe1770eedf96b97cad58118eb5c3062 Mon Sep 17 00:00:00 2001 From: Andrew McKnight Date: Wed, 4 Oct 2023 14:41:20 -0700 Subject: [PATCH] ci: update unit test iOS/Xcode versions (#3283) Co-authored-by: Andrew McKnight --- .github/workflows/test.yml | 10 +++++++--- scripts/xcode-test.sh | 3 ++- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index bd0f26ed8e..89604977e9 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -84,24 +84,28 @@ jobs: platform: "iOS" xcode: "13.2.1" test-destination-os: "13.7" + device: "iPhone 8" # iOS 14 - runs-on: macos-11 platform: "iOS" xcode: "13.2.1" test-destination-os: "14.5" + device: "iPhone 8" # iOS 15 - runs-on: macos-12 platform: "iOS" xcode: "13.4.1" test-destination-os: "latest" + device: "iPhone 8" # iOS 16 - runs-on: macos-13 platform: "iOS" xcode: "14.3" - test-destination-os: "latest" + test-destination-os: "16.4" + device: "iPhone 14" # macOS 11 - runs-on: macos-11 @@ -178,14 +182,14 @@ jobs: # We split building and running tests in two steps so we know how long running the tests takes. - name: Build tests id: build_tests - run: ./scripts/xcode-test.sh ${{matrix.platform}} ${{matrix.test-destination-os}} $GITHUB_REF_NAME ci build-for-testing + run: ./scripts/xcode-test.sh ${{matrix.platform}} ${{matrix.test-destination-os}} $GITHUB_REF_NAME ci build-for-testing "${{matrix.device}}" - name: Run tests # We call a script with the platform so the destination # passed to xcodebuild doesn't end up in the job name, # because GitHub Actions don't provide an easy way of # manipulating string in expressions. - run: ./scripts/xcode-test.sh ${{matrix.platform}} ${{matrix.test-destination-os}} $GITHUB_REF_NAME ci test-without-building + run: ./scripts/xcode-test.sh ${{matrix.platform}} ${{matrix.test-destination-os}} $GITHUB_REF_NAME ci test-without-building "${{matrix.device}}" - name: Slowest Tests if: ${{ always() }} diff --git a/scripts/xcode-test.sh b/scripts/xcode-test.sh index aec74e2533..f10af43364 100755 --- a/scripts/xcode-test.sh +++ b/scripts/xcode-test.sh @@ -10,6 +10,7 @@ set -euxo pipefail PLATFORM="${1}" OS=${2:-latest} +DEVICE=${6:-iPhone 14} REF_NAME="${3-HEAD}" IS_LOCAL_BUILD="${4:-ci}" COMMAND="${5:-test}" @@ -27,7 +28,7 @@ case $PLATFORM in ;; "iOS") - DESTINATION="platform=iOS Simulator,OS=$OS,name=iPhone 8" + DESTINATION="platform=iOS Simulator,OS=$OS,name=$DEVICE" ;; "tvOS")