Skip to content

Commit 72f14f4

Browse files
Merge pull request #12 from SomeRandomiOSDev/CodeCoverage
Fixed Code Coverage Reports
2 parents f458319 + bd2edbf commit 72f14f4

File tree

4 files changed

+77
-4
lines changed

4 files changed

+77
-4
lines changed

.github/workflows/swift.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,12 @@ jobs:
2525
~/$SWIFT_EXEC build -v
2626
- name: Test
2727
run: |
28-
~/$SWIFT_EXEC test -v
28+
~/$SWIFT_EXEC test -v --enable-code-coverage
29+
- name: Upload Code Coverage
30+
run: |
31+
if [ "$(uname)" == "Linux" ]; then
32+
echo Skipping Code Coverage upload for Linux
33+
else
34+
xcrun llvm-cov export -format="lcov" .build/debug/CBORCodingPackageTests.xctest/Contents/MacOS/CBORCodingPackageTests -instr-profile .build/debug/codecov/default.profdata > info.lcov
35+
bash <(curl https://codecov.io/bash)
36+
fi

.travis.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,3 @@ script:
88
- set -o pipefail && travis_retry xcodebuild -scheme "CBORCoding macOS Tests" -destination "platform=macOS" -configuration Debug ONLY_ACTIVE_ARCH=YES -enableCodeCoverage YES test
99
- set -o pipefail && travis_retry xcodebuild -scheme "CBORCoding tvOS Tests" -destination "platform=tvOS Simulator,name=Apple TV 4K" -configuration Debug ONLY_ACTIVE_ARCH=YES -enableCodeCoverage YES test
1010
- set -o pipefail && travis_retry xcodebuild -scheme "CBORCoding watchOS" -destination "platform=watchOS Simulator,name=Apple Watch Series 5 - 44mm" -configuration Debug ONLY_ACTIVE_ARCH=YES
11-
12-
after_success:
13-
- bash <(curl -s https://codecov.io/bash)

CBORCoding.xcodeproj/project.pbxproj

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,7 @@
196196
DDB1DF2E2409E76500C20FED /* CBOREncoderTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CBOREncoderTests.swift; sourceTree = "<group>"; };
197197
DDB1DF3E2409E77500C20FED /* CBORCodingTests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = "CBORCodingTests-Info.plist"; path = "Plists/CBORCodingTests-Info.plist"; sourceTree = "<group>"; };
198198
DDB1DFA2240E949B00C20FED /* Package@swift-4.2.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Package@swift-4.2.swift"; sourceTree = "<group>"; };
199+
DDF723882413688A00F58881 /* codecov.yml */ = {isa = PBXFileReference; lastKnownFileType = text.yaml; path = codecov.yml; sourceTree = "<group>"; };
199200
DDF755AB22A80069002E11D4 /* .travis.yml */ = {isa = PBXFileReference; lastKnownFileType = text; path = .travis.yml; sourceTree = SOURCE_ROOT; };
200201
DDF755AC22A8649F002E11D4 /* Package.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Package.swift; sourceTree = SOURCE_ROOT; };
201202
/* End PBXFileReference section */
@@ -266,6 +267,7 @@
266267
DD12989122A487FB005CEB9A /* CBORCoding.podspec */,
267268
DDF755AC22A8649F002E11D4 /* Package.swift */,
268269
DDB1DFA2240E949B00C20FED /* Package@swift-4.2.swift */,
270+
DDF723882413688A00F58881 /* codecov.yml */,
269271
DD1298A122A546B4005CEB9A /* .swiftlint.yml */,
270272
DDF755AB22A80069002E11D4 /* .travis.yml */,
271273
DD12989322A487FB005CEB9A /* README.md */,
@@ -422,6 +424,7 @@
422424
buildRules = (
423425
);
424426
dependencies = (
427+
DD07934E2412F06400EF65B4 /* PBXTargetDependency */,
425428
DD12991B22A56494005CEB9A /* PBXTargetDependency */,
426429
);
427430
name = "CBORCoding macOS";
@@ -463,6 +466,7 @@
463466
buildRules = (
464467
);
465468
dependencies = (
469+
DD07934C2412F06000EF65B4 /* PBXTargetDependency */,
466470
DD12991D22A5649B005CEB9A /* PBXTargetDependency */,
467471
);
468472
name = "CBORCoding tvOS";
@@ -504,6 +508,7 @@
504508
buildRules = (
505509
);
506510
dependencies = (
511+
DD07934A2412F05D00EF65B4 /* PBXTargetDependency */,
507512
DD12991F22A564A0005CEB9A /* PBXTargetDependency */,
508513
);
509514
name = "CBORCoding watchOS";
@@ -527,6 +532,7 @@
527532
buildRules = (
528533
);
529534
dependencies = (
535+
DD0793502412F06800EF65B4 /* PBXTargetDependency */,
530536
DD1298A022A48C6C005CEB9A /* PBXTargetDependency */,
531537
);
532538
name = CBORCoding;
@@ -789,6 +795,22 @@
789795
/* End PBXSourcesBuildPhase section */
790796

791797
/* Begin PBXTargetDependency section */
798+
DD07934A2412F05D00EF65B4 /* PBXTargetDependency */ = {
799+
isa = PBXTargetDependency;
800+
productRef = DD0793492412F05D00EF65B4 /* Half */;
801+
};
802+
DD07934C2412F06000EF65B4 /* PBXTargetDependency */ = {
803+
isa = PBXTargetDependency;
804+
productRef = DD07934B2412F06000EF65B4 /* Half */;
805+
};
806+
DD07934E2412F06400EF65B4 /* PBXTargetDependency */ = {
807+
isa = PBXTargetDependency;
808+
productRef = DD07934D2412F06400EF65B4 /* Half */;
809+
};
810+
DD0793502412F06800EF65B4 /* PBXTargetDependency */ = {
811+
isa = PBXTargetDependency;
812+
productRef = DD07934F2412F06800EF65B4 /* Half */;
813+
};
792814
DD1298A022A48C6C005CEB9A /* PBXTargetDependency */ = {
793815
isa = PBXTargetDependency;
794816
target = DD12989722A48C30005CEB9A /* Run SwiftLint */;
@@ -1388,6 +1410,26 @@
13881410
/* End XCRemoteSwiftPackageReference section */
13891411

13901412
/* Begin XCSwiftPackageProductDependency section */
1413+
DD0793492412F05D00EF65B4 /* Half */ = {
1414+
isa = XCSwiftPackageProductDependency;
1415+
package = DDB1DF6C240B38A000C20FED /* XCRemoteSwiftPackageReference "Half" */;
1416+
productName = Half;
1417+
};
1418+
DD07934B2412F06000EF65B4 /* Half */ = {
1419+
isa = XCSwiftPackageProductDependency;
1420+
package = DDB1DF6C240B38A000C20FED /* XCRemoteSwiftPackageReference "Half" */;
1421+
productName = Half;
1422+
};
1423+
DD07934D2412F06400EF65B4 /* Half */ = {
1424+
isa = XCSwiftPackageProductDependency;
1425+
package = DDB1DF6C240B38A000C20FED /* XCRemoteSwiftPackageReference "Half" */;
1426+
productName = Half;
1427+
};
1428+
DD07934F2412F06800EF65B4 /* Half */ = {
1429+
isa = XCSwiftPackageProductDependency;
1430+
package = DDB1DF6C240B38A000C20FED /* XCRemoteSwiftPackageReference "Half" */;
1431+
productName = Half;
1432+
};
13911433
DDB1DF6D240B38A000C20FED /* Half */ = {
13921434
isa = XCSwiftPackageProductDependency;
13931435
package = DDB1DF6C240B38A000C20FED /* XCRemoteSwiftPackageReference "Half" */;

codecov.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
codecov:
2+
require_ci_to_pass: yes
3+
4+
coverage:
5+
precision: 2
6+
round: down
7+
range: "70...100"
8+
9+
parsers:
10+
gcov:
11+
branch_detection:
12+
conditional: yes
13+
loop: yes
14+
method: no
15+
macro: no
16+
17+
comment:
18+
layout: "reach,diff,flags,tree"
19+
behavior: default
20+
require_changes: no
21+
22+
ignore:
23+
- Tests/**/*
24+
25+
codecov:
26+
token: 08621d2f-fc4e-4e97-b690-c50886ce67b5

0 commit comments

Comments
 (0)