(Fixes #185) Made examSchedules optional #238
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: BsuirSchedule CI | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
cancel: | |
name: Cancel previous runs | |
runs-on: ubuntu-latest | |
steps: | |
- name: Cancel previous runs | |
uses: styfle/[email protected] | |
with: | |
workflow_id: ios.yml | |
access_token: ${{ github.token }} | |
test: | |
name: Build and Test BsuirSchedule using any available iPhone simulator | |
runs-on: macos-13 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Test | |
env: | |
platform: ${{ 'iOS Simulator' }} | |
DEVELOPER_DIR: /Applications/Xcode_15.2.0.app/Contents/Developer | |
run: | | |
set -o pipefail | |
# xcrun xctrace returns via stderr, not the expected stdout (see https://developer.apple.com/forums/thread/663959) | |
device=`xcrun xctrace list devices 2>&1 | grep -oE 'iPhone.*?[^\(]+' | head -1 | awk '{$1=$1;print}' | sed -e "s/ Simulator$//"` | |
xcodebuild -scheme "BsuirScheduleApp" -project "BsuirScheduleApp.xcodeproj" -destination "platform=$platform,name=$device" -skipMacroValidation clean test | xcpretty | |