Skip to content

Commit 7cb84cd

Browse files
Merge pull request #2 from SomeRandomiOSDev/Travis
Added Travis CI and CodeCov support
2 parents 73ca659 + 5b7a31a commit 7cb84cd

File tree

6 files changed

+85
-11
lines changed

6 files changed

+85
-11
lines changed

.travis.yml

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
os: osx
2+
language: swift
3+
osx_image: xcode10.2
4+
xcode_project: CBORCoding.xcodeproj
5+
6+
script:
7+
- set -o pipefail && travis_retry xcodebuild -scheme "CBORCoding" -destination "platform=iOS Simulator,name=iPhone XS Max" -configuration Test ONLY_ACTIVE_ARCH=YES -enableCodeCoverage YES test
8+
- set -o pipefail && travis_retry xcodebuild -scheme "CBORCoding tvOS" -destination "platform=tvOS Simulator,name=Apple TV 4K" -configuration Test ONLY_ACTIVE_ARCH=YES -enableCodeCoverage YES test
9+
- set -o pipefail && travis_retry xcodebuild -scheme "CBORCoding watchOS" -destination "platform=watchOS Simulator,name=Apple Watch Series 4 - 44mm" -configuration Debug ONLY_ACTIVE_ARCH=YES
10+
- set -o pipefail && travis_retry xcodebuild -scheme "CBORCoding macOS" -destination "platform=macOS" -configuration Test ONLY_ACTIVE_ARCH=YES -enableCodeCoverage YES test
11+
12+
after_success:
13+
- bash <(curl -s https://codecov.io/bash)

CBORCoding.xcodeproj/project.pbxproj

+2-6
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,6 @@
2424
DD0812F7229CD69B0003E3F6 /* CBORParser.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD0812F6229CD69B0003E3F6 /* CBORParser.swift */; };
2525
DD0812FA229CE1840003E3F6 /* CBORParserTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD0812F9229CE1840003E3F6 /* CBORParserTests.swift */; };
2626
DD12988922A47C4B005CEB9A /* CBOR+Equatable.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD12988822A47C4B005CEB9A /* CBOR+Equatable.swift */; };
27-
DD12989422A487FB005CEB9A /* CBORCoding.podspec in Resources */ = {isa = PBXBuildFile; fileRef = DD12989122A487FB005CEB9A /* CBORCoding.podspec */; };
28-
DD12989522A487FB005CEB9A /* LICENSE in Resources */ = {isa = PBXBuildFile; fileRef = DD12989222A487FB005CEB9A /* LICENSE */; };
29-
DD12989622A487FB005CEB9A /* README.md in Resources */ = {isa = PBXBuildFile; fileRef = DD12989322A487FB005CEB9A /* README.md */; };
3027
DD1298B122A563BE005CEB9A /* CBORCoding.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DD1298A822A563BE005CEB9A /* CBORCoding.framework */; };
3128
DD1298C122A563E0005CEB9A /* CBORTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD957E6922942D98000127A3 /* CBORTests.swift */; };
3229
DD1298C222A563E0005CEB9A /* ContainersTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD957E6D2296B6B7000127A3 /* ContainersTests.swift */; };
@@ -151,6 +148,7 @@
151148
DD957E6D2296B6B7000127A3 /* ContainersTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContainersTests.swift; sourceTree = "<group>"; };
152149
DD957E722296D514000127A3 /* CBORDecoderTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CBORDecoderTests.swift; sourceTree = "<group>"; };
153150
DD957E9C2299CE1C000127A3 /* CBOR+Codable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "CBOR+Codable.swift"; sourceTree = "<group>"; };
151+
DDF755AB22A80069002E11D4 /* .travis.yml */ = {isa = PBXFileReference; lastKnownFileType = text; path = .travis.yml; sourceTree = SOURCE_ROOT; };
154152
/* End PBXFileReference section */
155153

156154
/* Begin PBXFrameworksBuildPhase section */
@@ -242,6 +240,7 @@
242240
children = (
243241
DD12989122A487FB005CEB9A /* CBORCoding.podspec */,
244242
DD1298A122A546B4005CEB9A /* .swiftlint.yml */,
243+
DDF755AB22A80069002E11D4 /* .travis.yml */,
245244
DD12989322A487FB005CEB9A /* README.md */,
246245
DD12992022A5680A005CEB9A /* ATTRIBUTIONS */,
247246
DD12989222A487FB005CEB9A /* LICENSE */,
@@ -562,9 +561,6 @@
562561
isa = PBXResourcesBuildPhase;
563562
buildActionMask = 2147483647;
564563
files = (
565-
DD12989622A487FB005CEB9A /* README.md in Resources */,
566-
DD12989522A487FB005CEB9A /* LICENSE in Resources */,
567-
DD12989422A487FB005CEB9A /* CBORCoding.podspec in Resources */,
568564
);
569565
runOnlyForDeploymentPostprocessing = 0;
570566
};

CBORCoding.xcodeproj/xcshareddata/xcschemes/CBORCoding macOS Tests.xcscheme

+12-1
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,21 @@
77
buildImplicitDependencies = "YES">
88
</BuildAction>
99
<TestAction
10-
buildConfiguration = "Debug"
10+
buildConfiguration = "Test"
1111
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
1212
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
13+
codeCoverageEnabled = "YES"
14+
onlyGenerateCoverageForSpecifiedTargets = "YES"
1315
shouldUseLaunchSchemeArgsEnv = "YES">
16+
<CodeCoverageTargets>
17+
<BuildableReference
18+
BuildableIdentifier = "primary"
19+
BlueprintIdentifier = "DD1298A722A563BE005CEB9A"
20+
BuildableName = "CBORCoding.framework"
21+
BlueprintName = "CBORCoding macOS"
22+
ReferencedContainer = "container:CBORCoding.xcodeproj">
23+
</BuildableReference>
24+
</CodeCoverageTargets>
1425
<Testables>
1526
<TestableReference
1627
skipped = "NO">

CBORCoding.xcodeproj/xcshareddata/xcschemes/CBORCoding tvOS Tests.xcscheme

+55-1
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,39 @@
55
<BuildAction
66
parallelizeBuildables = "YES"
77
buildImplicitDependencies = "YES">
8+
<BuildActionEntries>
9+
<BuildActionEntry
10+
buildForTesting = "YES"
11+
buildForRunning = "YES"
12+
buildForProfiling = "YES"
13+
buildForArchiving = "YES"
14+
buildForAnalyzing = "YES">
15+
<BuildableReference
16+
BuildableIdentifier = "primary"
17+
BlueprintIdentifier = "DD1298DF22A56430005CEB9A"
18+
BuildableName = "CBORCoding.framework"
19+
BlueprintName = "CBORCoding tvOS"
20+
ReferencedContainer = "container:CBORCoding.xcodeproj">
21+
</BuildableReference>
22+
</BuildActionEntry>
23+
</BuildActionEntries>
824
</BuildAction>
925
<TestAction
10-
buildConfiguration = "Debug"
26+
buildConfiguration = "Test"
1127
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
1228
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
29+
codeCoverageEnabled = "YES"
30+
onlyGenerateCoverageForSpecifiedTargets = "YES"
1331
shouldUseLaunchSchemeArgsEnv = "YES">
32+
<CodeCoverageTargets>
33+
<BuildableReference
34+
BuildableIdentifier = "primary"
35+
BlueprintIdentifier = "DD1298DF22A56430005CEB9A"
36+
BuildableName = "CBORCoding.framework"
37+
BlueprintName = "CBORCoding tvOS"
38+
ReferencedContainer = "container:CBORCoding.xcodeproj">
39+
</BuildableReference>
40+
</CodeCoverageTargets>
1441
<Testables>
1542
<TestableReference
1643
skipped = "NO">
@@ -23,6 +50,15 @@
2350
</BuildableReference>
2451
</TestableReference>
2552
</Testables>
53+
<MacroExpansion>
54+
<BuildableReference
55+
BuildableIdentifier = "primary"
56+
BlueprintIdentifier = "DD1298DF22A56430005CEB9A"
57+
BuildableName = "CBORCoding.framework"
58+
BlueprintName = "CBORCoding tvOS"
59+
ReferencedContainer = "container:CBORCoding.xcodeproj">
60+
</BuildableReference>
61+
</MacroExpansion>
2662
<AdditionalOptions>
2763
</AdditionalOptions>
2864
</TestAction>
@@ -36,6 +72,15 @@
3672
debugDocumentVersioning = "YES"
3773
debugServiceExtension = "internal"
3874
allowLocationSimulation = "YES">
75+
<MacroExpansion>
76+
<BuildableReference
77+
BuildableIdentifier = "primary"
78+
BlueprintIdentifier = "DD1298DF22A56430005CEB9A"
79+
BuildableName = "CBORCoding.framework"
80+
BlueprintName = "CBORCoding tvOS"
81+
ReferencedContainer = "container:CBORCoding.xcodeproj">
82+
</BuildableReference>
83+
</MacroExpansion>
3984
<AdditionalOptions>
4085
</AdditionalOptions>
4186
</LaunchAction>
@@ -45,6 +90,15 @@
4590
savedToolIdentifier = ""
4691
useCustomWorkingDirectory = "NO"
4792
debugDocumentVersioning = "YES">
93+
<MacroExpansion>
94+
<BuildableReference
95+
BuildableIdentifier = "primary"
96+
BlueprintIdentifier = "DD1298DF22A56430005CEB9A"
97+
BuildableName = "CBORCoding.framework"
98+
BlueprintName = "CBORCoding tvOS"
99+
ReferencedContainer = "container:CBORCoding.xcodeproj">
100+
</BuildableReference>
101+
</MacroExpansion>
48102
</ProfileAction>
49103
<AnalyzeAction
50104
buildConfiguration = "Debug">

CBORCoding.xcodeproj/xcshareddata/xcschemes/CBORCoding watchOS.xcscheme

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
</BuildActionEntries>
2424
</BuildAction>
2525
<TestAction
26-
buildConfiguration = "Debug"
26+
buildConfiguration = "Test"
2727
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
2828
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
2929
shouldUseLaunchSchemeArgsEnv = "YES">

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ CBORCoding
55
[![CocoaPods Compatible](https://img.shields.io/cocoapods/v/CBORCoding.svg)](https://cocoapods.org/pods/CBORCoding)
66
[![Carthage Compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)
77
[![Platform](https://img.shields.io/cocoapods/p/CBORCoding.svg)](https://cocoapods.org/pods/CBORCoding)
8+
[![Build](https://travis-ci.com/SomeRandomiOSDev/CBORCoding.svg?branch=master)](https://travis-ci.com/SomeRandomiOSDev/CBORCoding)
9+
[![Code Coverage](https://codecov.io/gh/SomeRandomiOSDev/CBORCoding/branch/master/graph/badge.svg)](https://codecov.io/gh/SomeRandomiOSDev/CBORCoding)
810

911
**CBORCoding** is a lightweight framework containing a coder pair for encoding and decoding `Codable` conforming types to and from [CBOR](https://cbor.io) document format for iOS, macOS, tvOS, and watchOS.
1012

@@ -78,8 +80,6 @@ For more information about the CBOR format see: [CBOR](https://cbor.io) & [RFC 7
7880
TODO
7981
--------
8082

81-
* Add automated build/testing/code coverage.
82-
* Add automated PR Checks.
8383
* Add additional options to `CBOREncoder` and `CBORDecoder`.
8484

8585
Contributing

0 commit comments

Comments
 (0)