Skip to content

Commit

Permalink
CI - Add GitHub test/build workflows
Browse files Browse the repository at this point in the history
Signed-off-by: Joseph Mattiello <mail@joemattiello.com>
Signed-off-by: Joe Mattiello <git@joemattiello.com>
  • Loading branch information
JoeMatt committed Oct 29, 2019
1 parent 36c74ac commit f57de2c
Show file tree
Hide file tree
Showing 3 changed files with 76 additions and 4 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
on:
push:
branches:
- master
name: Build
jobs:
test:
name: Build
runs-on: macOS-latest
strategy:
matrix:
destination: [
'platform=iOS Simulator,OS=12.4,name=iPhone X',
'platform=tvOS Simulator,OS=12.4,name=Apple TV 4']
steps:
- name: Checkout
uses: actions/checkout@master
- name: Build
run: |
pod install
set -o pipefail && xcodebuild clean build -workspace Hero.xcworkspace -scheme Hero -destination "${destination}" CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO ONLY_ACTIVE_ARCH=NO
env:
destination: ${{ matrix.destination }}
43 changes: 43 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
on: pull_request
name: Test
jobs:
iOS:
name: Test iOS
runs-on: macOS-latest
env:
DEVELOPER_DIR: /Applications/Xcode_11.1.app/Contents/Developer
strategy:
matrix:
destination: [
'platform=iOS Simulator,OS=10.2,name=iPhone 7',
'platform=iOS Simulator,OS=13.1,name=iPhone 11'
]
steps:
- name: Checkout
uses: actions/checkout@master
- name: iOS - ${{ matrix.destination }}
run: |
pod install
set -o pipefail && xcodebuild clean test -workspace Hero.xcworkspace -scheme Hero -destination "${destination}" -parallelizeTargets -showBuildTimingSummary -enableThreadSanitizer YES -enableCodeCoverage YES CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO ONLY_ACTIVE_ARCH=NO | xcpretty
bash <(curl -s https://codecov.io/bash)
env:
destination: ${{ matrix.destination }}

tvOS:
name: Test tvOS
runs-on: macOS-latest
strategy:
matrix:
destination: [
'platform=tvOS Simulator,OS=13.0,name=Apple TV 4K'
]

steps:
- name: Checkout
uses: actions/checkout@master
- name: tvOS - ${{ matrix.destination }}
run: |
pod install
set -o pipefail && xcodebuild clean build -workspace Hero.xcworkspace -scheme "Hero (tvOS)" -destination "${destination}" -parallelizeTargets -showBuildTimingSummary -enableThreadSanitizer YES CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO ONLY_ACTIVE_ARCH=NO | xcpretty
env:
destination: ${{ matrix.destination }}
14 changes: 10 additions & 4 deletions Hero.xcodeproj/xcshareddata/xcschemes/Hero.xcscheme
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,17 @@
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "AF1E1B501E66822C00ECE039"
BuildableName = "HeroTests.xctest"
BlueprintName = "HeroTests"
ReferencedContainer = "container:Hero.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
Expand All @@ -51,8 +59,6 @@
ReferencedContainer = "container:Hero.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
Expand Down

0 comments on commit f57de2c

Please sign in to comment.