Skip to content

Fixed Code Coverage Reports #12

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 7, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion .github/workflows/swift.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,12 @@ jobs:
~/$SWIFT_EXEC build -v
- name: Test
run: |
~/$SWIFT_EXEC test -v
~/$SWIFT_EXEC test -v --enable-code-coverage
- name: Upload Code Coverage
run: |
if [ "$(uname)" == "Linux" ]; then
echo Skipping Code Coverage upload for Linux
else
xcrun llvm-cov export -format="lcov" .build/debug/CBORCodingPackageTests.xctest/Contents/MacOS/CBORCodingPackageTests -instr-profile .build/debug/codecov/default.profdata > info.lcov
bash <(curl https://codecov.io/bash)
fi
3 changes: 0 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,3 @@ script:
- set -o pipefail && travis_retry xcodebuild -scheme "CBORCoding macOS Tests" -destination "platform=macOS" -configuration Debug ONLY_ACTIVE_ARCH=YES -enableCodeCoverage YES test
- 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
- 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

after_success:
- bash <(curl -s https://codecov.io/bash)
42 changes: 42 additions & 0 deletions CBORCoding.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@
DDB1DF2E2409E76500C20FED /* CBOREncoderTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CBOREncoderTests.swift; sourceTree = "<group>"; };
DDB1DF3E2409E77500C20FED /* CBORCodingTests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = "CBORCodingTests-Info.plist"; path = "Plists/CBORCodingTests-Info.plist"; sourceTree = "<group>"; };
DDB1DFA2240E949B00C20FED /* Package@swift-4.2.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Package@swift-4.2.swift"; sourceTree = "<group>"; };
DDF723882413688A00F58881 /* codecov.yml */ = {isa = PBXFileReference; lastKnownFileType = text.yaml; path = codecov.yml; sourceTree = "<group>"; };
DDF755AB22A80069002E11D4 /* .travis.yml */ = {isa = PBXFileReference; lastKnownFileType = text; path = .travis.yml; sourceTree = SOURCE_ROOT; };
DDF755AC22A8649F002E11D4 /* Package.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Package.swift; sourceTree = SOURCE_ROOT; };
/* End PBXFileReference section */
Expand Down Expand Up @@ -266,6 +267,7 @@
DD12989122A487FB005CEB9A /* CBORCoding.podspec */,
DDF755AC22A8649F002E11D4 /* Package.swift */,
DDB1DFA2240E949B00C20FED /* Package@swift-4.2.swift */,
DDF723882413688A00F58881 /* codecov.yml */,
DD1298A122A546B4005CEB9A /* .swiftlint.yml */,
DDF755AB22A80069002E11D4 /* .travis.yml */,
DD12989322A487FB005CEB9A /* README.md */,
Expand Down Expand Up @@ -422,6 +424,7 @@
buildRules = (
);
dependencies = (
DD07934E2412F06400EF65B4 /* PBXTargetDependency */,
DD12991B22A56494005CEB9A /* PBXTargetDependency */,
);
name = "CBORCoding macOS";
Expand Down Expand Up @@ -463,6 +466,7 @@
buildRules = (
);
dependencies = (
DD07934C2412F06000EF65B4 /* PBXTargetDependency */,
DD12991D22A5649B005CEB9A /* PBXTargetDependency */,
);
name = "CBORCoding tvOS";
Expand Down Expand Up @@ -504,6 +508,7 @@
buildRules = (
);
dependencies = (
DD07934A2412F05D00EF65B4 /* PBXTargetDependency */,
DD12991F22A564A0005CEB9A /* PBXTargetDependency */,
);
name = "CBORCoding watchOS";
Expand All @@ -527,6 +532,7 @@
buildRules = (
);
dependencies = (
DD0793502412F06800EF65B4 /* PBXTargetDependency */,
DD1298A022A48C6C005CEB9A /* PBXTargetDependency */,
);
name = CBORCoding;
Expand Down Expand Up @@ -789,6 +795,22 @@
/* End PBXSourcesBuildPhase section */

/* Begin PBXTargetDependency section */
DD07934A2412F05D00EF65B4 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
productRef = DD0793492412F05D00EF65B4 /* Half */;
};
DD07934C2412F06000EF65B4 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
productRef = DD07934B2412F06000EF65B4 /* Half */;
};
DD07934E2412F06400EF65B4 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
productRef = DD07934D2412F06400EF65B4 /* Half */;
};
DD0793502412F06800EF65B4 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
productRef = DD07934F2412F06800EF65B4 /* Half */;
};
DD1298A022A48C6C005CEB9A /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = DD12989722A48C30005CEB9A /* Run SwiftLint */;
Expand Down Expand Up @@ -1388,6 +1410,26 @@
/* End XCRemoteSwiftPackageReference section */

/* Begin XCSwiftPackageProductDependency section */
DD0793492412F05D00EF65B4 /* Half */ = {
isa = XCSwiftPackageProductDependency;
package = DDB1DF6C240B38A000C20FED /* XCRemoteSwiftPackageReference "Half" */;
productName = Half;
};
DD07934B2412F06000EF65B4 /* Half */ = {
isa = XCSwiftPackageProductDependency;
package = DDB1DF6C240B38A000C20FED /* XCRemoteSwiftPackageReference "Half" */;
productName = Half;
};
DD07934D2412F06400EF65B4 /* Half */ = {
isa = XCSwiftPackageProductDependency;
package = DDB1DF6C240B38A000C20FED /* XCRemoteSwiftPackageReference "Half" */;
productName = Half;
};
DD07934F2412F06800EF65B4 /* Half */ = {
isa = XCSwiftPackageProductDependency;
package = DDB1DF6C240B38A000C20FED /* XCRemoteSwiftPackageReference "Half" */;
productName = Half;
};
DDB1DF6D240B38A000C20FED /* Half */ = {
isa = XCSwiftPackageProductDependency;
package = DDB1DF6C240B38A000C20FED /* XCRemoteSwiftPackageReference "Half" */;
Expand Down
26 changes: 26 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
codecov:
require_ci_to_pass: yes

coverage:
precision: 2
round: down
range: "70...100"

parsers:
gcov:
branch_detection:
conditional: yes
loop: yes
method: no
macro: no

comment:
layout: "reach,diff,flags,tree"
behavior: default
require_changes: no

ignore:
- Tests/**/*

codecov:
token: 08621d2f-fc4e-4e97-b690-c50886ce67b5