diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml index e2cb8c596..d4ab208a6 100644 --- a/.github/workflows/run_tests.yml +++ b/.github/workflows/run_tests.yml @@ -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 diff --git a/Scripts/run_ios15_tests.sh b/Scripts/run_ios15_tests.sh new file mode 100755 index 000000000..b591fc6a9 --- /dev/null +++ b/Scripts/run_ios15_tests.sh @@ -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"