Skip to content

Commit

Permalink
Add XCPretty to GH build actions
Browse files Browse the repository at this point in the history
  • Loading branch information
terwanerik committed Mar 17, 2022
1 parent d02da8f commit 347c955
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 8 deletions.
16 changes: 12 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Prepare
run: gem install xcpretty
- name: Build
run: xcodebuild build -scheme 'MMMAsyncLoadable' -destination generic/platform=iOS
run: xcodebuild build -scheme 'MMMAsyncLoadable' -destination generic/platform=iOS | xcpretty

build_watchos:
name: Build watchOS
Expand All @@ -24,8 +26,10 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Prepare
run: gem install xcpretty
- name: Build
run: xcodebuild build -scheme 'MMMAsyncLoadable' -destination generic/platform=watchOS
run: xcodebuild build -scheme 'MMMAsyncLoadable' -destination generic/platform=watchOS | xcpretty

build_tvos:
name: Build tvOS
Expand All @@ -34,8 +38,10 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Prepare
run: gem install xcpretty
- name: Build
run: xcodebuild build -scheme 'MMMAsyncLoadable' -destination generic/platform=tvOS
run: xcodebuild build -scheme 'MMMAsyncLoadable' -destination generic/platform=tvOS | xcpretty

build_macos:
name: Build macOS
Expand All @@ -44,5 +50,7 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Prepare
run: gem install xcpretty
- name: Build
run: xcodebuild build -scheme 'MMMAsyncLoadable' -destination generic/platform=macOS
run: xcodebuild build -scheme 'MMMAsyncLoadable' -destination generic/platform=macOS | xcpretty
16 changes: 12 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,12 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Prepare
run: gem install xcpretty
- name: Test
run: |
device=`xcrun simctl list devices available | grep -oE 'iPhone.*?[^\(]+' | head -1 | awk '{$1=$1;print}'`
xcodebuild test -destination "name=$device" -scheme 'MMMAsyncLoadable'
xcodebuild test -destination "name=$device" -scheme 'MMMAsyncLoadable' | xcpretty
build_watchos:
name: Test watchOS
Expand All @@ -26,10 +28,12 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Prepare
run: gem install xcpretty
- name: Test
run: |
device=`xcrun simctl list devices available | grep -oE 'Apple Watch.*?[^\(]+' | head -1 | awk '{$1=$1;print}'`
xcodebuild test -destination "name=$device" -scheme 'MMMAsyncLoadable'
xcodebuild test -destination "name=$device" -scheme 'MMMAsyncLoadable' | xcpretty
build_tvos:
name: Test tvOS
Expand All @@ -38,10 +42,12 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Prepare
run: gem install xcpretty
- name: Test
run: |
device=`xcrun simctl list devices available | grep -oE 'Apple TV.*?[^\(]+' | head -1 | awk '{$1=$1;print}'`
xcodebuild test -destination "name=$device" -scheme 'MMMAsyncLoadable'
xcodebuild test -destination "name=$device" -scheme 'MMMAsyncLoadable' | xcpretty
build_macos:
name: Test macOS
Expand All @@ -50,5 +56,7 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Prepare
run: gem install xcpretty
- name: Test
run: xcodebuild test -destination 'platform=OS X' -scheme 'MMMAsyncLoadable'
run: xcodebuild test -destination 'platform=OS X' -scheme 'MMMAsyncLoadable' | xcpretty

0 comments on commit 347c955

Please sign in to comment.