Skip to content

Commit

Permalink
ci: add automated check for each of the example applications
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewjl-mux committed Jan 3, 2024
1 parent 79de7d3 commit e673c80
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 4 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,11 @@ on:
push:

jobs:
tests:
name: Test the SDK with a Demo App
test-example-applications:
name: Test SDK example applications on iOS and tvOS
runs-on: macos-13
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Run tests
run: "./run-tests.sh"

run: "./scripts/run-tests.sh"
31 changes: 31 additions & 0 deletions scripts/run-tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/bin/bash
set -euo pipefail

if ! command -v xcbeautify &> /dev/null
then
echo -e "\033[1;31m ERROR: xcbeautify could not be found please install it... \033[0m"
exit 1
fi

echo "▸ Current Xcode: $(xcode-select -p)"

readonly XCODE=$(xcodebuild -version | grep Xcode | cut -d " " -f2)

echo "▸ Using Xcode Version: ${XCODE}"

echo "▸ Available Xcode SDKs"
xcodebuild -showsdks

echo "▸ Running DemoApp tests"

xcodebuild clean test \
-scheme DemoApp \
-workspace Example/MUXSDKImaListener.xcworkspace \
-destination 'platform=iOS Simulator,OS=17.2,name=iPhone 15' | xcbeautify

echo "▸ Running MUXSDKIMATVOSExample tests"

xcodebuild clean test \
-scheme MUXSDKIMATVOSExample \
-workspace Example/MUXSDKImaListener.xcworkspace \
-destination 'platform=tvOS Simulator,OS=17.2,name=Apple TV' | xcbeautify

0 comments on commit e673c80

Please sign in to comment.