Skip to content

Commit

Permalink
Merge pull request #82 from cb-haripriyan/chore/add-tests-to-pr
Browse files Browse the repository at this point in the history
Updates Github Actions to run iOS tests
  • Loading branch information
cb-haripriyan authored Aug 21, 2023
2 parents 626ff22 + 323ea8b commit 094eca1
Showing 1 changed file with 17 additions and 5 deletions.
22 changes: 17 additions & 5 deletions .github/workflows/swift.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Swift
name: Swift Build

on:
push:
Expand All @@ -9,9 +9,21 @@ on:
jobs:
build:
runs-on: macos-latest

steps:
- uses: actions/checkout@v2
- name: Build
- 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: |
swift build -v -Xswiftc "-sdk" -Xswiftc "`xcrun --sdk iphonesimulator --show-sdk-path`" -Xswiftc "-target" -Xswiftc "x86_64-apple-ios11.2-simulator"
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]}

0 comments on commit 094eca1

Please sign in to comment.