Skip to content

Commit

Permalink
ci: run unit tests on push (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewjl-mux authored Oct 6, 2023
1 parent d5051c7 commit 58f3181
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Run Tests

on:
push:

jobs:
unit-tests:
name: Run Unit Tests
runs-on: macos-13
steps:
- name: Install xcbeautify
run: brew install xcbeautify
- name: Checkout
uses: actions/checkout@v3
- name: Run Tests
run: "scripts/run-unit-tests.sh MuxAVPlayerSDK"
36 changes: 36 additions & 0 deletions scripts/run-unit-tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#!/bin/bash

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

set -euo pipefail

if [ $# -ne 1 ]; then
echo "▸ Usage: $0 SCHEME"
exit 1
fi

readonly SCHEME="$1"

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 "▸ Selecting Xcode 15"

sudo xcode-select -s /Applications/Xcode_15.0.app/Contents/Developer

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

echo "▸ Available Xcode SDKs"

xcodebuild -showsdks

echo "▸ Test ${SCHEME}"

xcodebuild clean test \
-scheme $SCHEME \
-destination 'platform=iOS Simulator,OS=17.0,name=iPhone 15' \
-sdk iphonesimulator17.0 \
| xcbeautify

0 comments on commit 58f3181

Please sign in to comment.
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy