OMNISUB-5987 #197
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: Swift Build | |
on: | |
push: | |
branches: [master] | |
pull_request: | |
branches: [master] | |
jobs: | |
build: | |
runs-on: macos-latest | |
steps: | |
- name: Checkout Source | |
uses: actions/checkout@v2 | |
- uses: actions/cache@v2 | |
id: cocoapods-cache | |
with: | |
path: Pods | |
key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }} | |
restore-keys: | | |
${{ runner.os }}-pods- | |
- name: CocoaPods | |
if: steps.cocoapods-cache.outputs.cache-hit != 'true' | |
run: | | |
pod install --project-directory=Example | |
- name: Select Xcode | |
run: sudo xcode-select -switch /Applications/Xcode_14.2.app && /usr/bin/xcodebuild -version | |
- name: Run unit tests | |
run: xcodebuild build test -scheme Chargebee -workspace 'Example/Chargebee Example.xcworkspace' -destination 'platform=iOS Simulator,name=iPhone 14 Pro,OS=16.2' | xcpretty && exit ${PIPESTATUS[0]} |