Skip to content

Commit

Permalink
ci: update unit test iOS/Xcode versions (#3283)
Browse files Browse the repository at this point in the history
Co-authored-by: Andrew McKnight <[email protected]>
  • Loading branch information
armcknight and Andrew McKnight authored Oct 4, 2023
1 parent 2e88e64 commit 5e66a38
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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() }}
Expand Down
3 changes: 2 additions & 1 deletion scripts/xcode-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand All @@ -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")
Expand Down

0 comments on commit 5e66a38

Please sign in to comment.