Skip to content

Commit

Permalink
ci: clean-up test script
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewjl-mux committed Sep 8, 2023
1 parent 6e8efb5 commit 7e813c0
Showing 1 changed file with 19 additions and 12 deletions.
31 changes: 19 additions & 12 deletions run-tests.sh
Original file line number Diff line number Diff line change
@@ -1,26 +1,33 @@
#!/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}/${WORKSPACE_NAME}.xcworkspace

set -euo pipefail

brew install xcbeautify

# reset simulators
echo "▸ Using Xcode Version: ${XCODE}"

echo "▸ Resetting Simulators"

xcrun -v simctl shutdown all
xcrun -v simctl erase all

echo "test xcode version"
xcodebuild -version

pushd Example
#pod deintegrate && pod update

xcodebuild -workspace MUXSDKImaListener.xcworkspace \
-scheme "MUXSDKImaListener-Example" \
-destination 'platform=iOS Simulator,name=iPhone 14,OS=16.2' \
test \
| xcbeautify
pod deintegrate && pod install

echo "▸ Executing Tests"

xcodebuild -workspace MUXSDKImaListener.xcworkspace \
-scheme "DemoApp" \
xcodebuild -workspace ${WORKSPACE_PATH} \
-scheme "${SCHEME}" \
-destination 'platform=iOS Simulator,name=iPhone 13,OS=16.2' \
test \
| xcbeautify
Expand Down

0 comments on commit 7e813c0

Please sign in to comment.