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 56c16ad
Show file tree
Hide file tree
Showing 3 changed files with 54 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 }}
21 changes: 21 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
on: pull_request
name: Test
jobs:
test:
name: Test
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 4K']
steps:
- name: Checkout
uses: actions/checkout@master
- name: Build and test
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 }}
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 56c16ad

Please sign in to comment.