-
Notifications
You must be signed in to change notification settings - Fork 4
/
run-tests.sh
executable file
·41 lines (24 loc) · 856 Bytes
/
run-tests.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/bin/bash
readonly XCODE_VERSION=$(xcodebuild -version | grep Xcode | cut -d " " -f2)
readonly SCHEME=DemoApp
readonly TOP_DIR=$(pwd)
readonly WORKSPACE_NAME=MUXSDKImaListener
readonly WORKSPACE_PATH=${TOP_DIR}/Example/${WORKSPACE_NAME}.xcworkspace
set -euo pipefail
brew install xcbeautify
echo "▸ Switching to Xcode 15.4"
sudo xcode-select -s /Applications/Xcode_15.4.app
echo "▸ Using Xcode Version: ${XCODE_VERSION}"
echo "▸ Shutdown and reset the simulator"
xcrun -v simctl shutdown all
xcrun -v simctl erase all
pushd Example
echo "▸ Reinstalling Local Cocoapod"
pod deintegrate && pod install
echo "▸ Executing Tests"
xcodebuild -workspace ${WORKSPACE_PATH} \
-scheme "${SCHEME}" \
-destination 'platform=iOS Simulator,name=iPhone 15,OS=17.5' \
clean test \
| xcbeautify
popd