Skip to content

Commit

Permalink
Update CI to run tests on iOS 15 and Xcode 13 (#346)
Browse files Browse the repository at this point in the history
* Update CI to run tests on iOS 15 and Xcode 13

* Fix script names
  • Loading branch information
kyleve authored Nov 2, 2021
1 parent 5fe4f4b commit f1985f6
Show file tree
Hide file tree
Showing 2 changed files with 66 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/run_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,49 @@ on:

jobs:

ios_15:
name: iOS 15

runs-on: macos-11

steps:
- name: Switch To Xcode 13.1
run: sudo xcode-select -switch /Applications/Xcode_13.1.app

- name: Checkout repository
uses: actions/checkout@v1

# Build Caching

- name: Cache Bundler
uses: actions/cache@v2
with:
path: vendor/bundle
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-gems-
- name: Cache Cocoapods
uses: actions/cache@v2
with:
path: Pods
key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }}
restore-keys: |
${{ runner.os }}-pods-
# Install & Build

- name: Bundle install
run: |
bundle config path vendor/bundle
bundle install --jobs 4 --retry 3
- name: Pod Install
run: bundle exec pod install --repo-update

- name: Run Tests
run: Scripts/run_ios15_tests.sh

ios_14:
name: iOS 14

Expand Down
23 changes: 23 additions & 0 deletions Scripts/run_ios15_tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/sh

set -e
set -o pipefail

# Deleting Old Simulators

SIMULATOR_NAME="Listable CI iPhone X (iOS 15.0)"

xcrun simctl delete "$SIMULATOR_NAME" || true

# Create New Simulators

DEVICE_UUID=$(xcrun simctl create "$SIMULATOR_NAME" "iPhone X" "com.apple.CoreSimulator.SimRuntime.iOS-15-0")
echo "Created iOS 15 simulator ($SIMULATOR_NAME): $DEVICE_UUID"

xcrun simctl boot "$DEVICE_UUID"


# Run Build

xcodebuild build-for-testing -workspace "Demo/Demo.xcworkspace" -scheme "Demo" -destination "id=$DEVICE_UUID" -quiet
xcodebuild test-without-building -workspace "Demo/Demo.xcworkspace" -scheme "Demo" -destination "id=$DEVICE_UUID"

0 comments on commit f1985f6

Please sign in to comment.