Skip to content

Commit 9cea2bf

Browse files
authored
ci: fix codecov for iOS (#262)
* ci: fix codecov for iOS * latest version of SwiftLint allows id * add debug codecov output * fix CI * remove extra codecov * try CI with removed files * Add back filter * add back legacy codecov * cover more operations * try legacy one more time * don't build legacy * remove ios codecov * add back iOS
1 parent 0e646a2 commit 9cea2bf

File tree

13 files changed

+67
-51
lines changed

13 files changed

+67
-51
lines changed

.codecov.yml

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
coverage:
22
ignore:
33
- Tests/ParseSwiftTests/.*
4+
- TestHost/*
5+
- TestHostTV/*
46
status:
57
patch:
68
default:
7-
target: auto
9+
target: 0
810
changes: false
911
project:
1012
default:
11-
target: 76
13+
target: 81
1214
comment:
1315
require_changes: true

.github/workflows/ci.yml

+10-5
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,20 @@ jobs:
2222
env:
2323
DEVELOPER_DIR: ${{ env.CI_XCODE_13 }}
2424
- name: Prepare codecov
25-
run: |
26-
XCTEST=$(find DerivedData -type f -name 'ParseSwiftTests')
27-
PROFDATA=$(find DerivedData -type f -name '*.profdata')
28-
xcrun llvm-cov export "${XCTEST}" -format="lcov" -instr-profile "${PROFDATA}" > info.lcov
25+
uses: sersoft-gmbh/swift-coverage-action@v2
26+
id: coverage-files
27+
with:
28+
target-name-filter: '^ParseSwift$'
29+
format: lcov
30+
search-paths: ./DerivedData
2931
env:
3032
DEVELOPER_DIR: ${{ env.CI_XCODE_13 }}
3133
- name: Upload coverage to Codecov
3234
uses: codecov/codecov-action@v2
3335
with:
36+
files: ${{join(fromJSON(steps.coverage-files.outputs.files), ',')}}
3437
env_vars: IOS
35-
fail_ci_if_error: false
38+
fail_ci_if_error: true
3639
env:
3740
DEVELOPER_DIR: ${{ env.CI_XCODE_13 }}
3841

@@ -63,6 +66,7 @@ jobs:
6366
with:
6467
files: ${{join(fromJSON(steps.coverage-files.outputs.files), ',')}}
6568
env_vars: MACOS
69+
fail_ci_if_error: true
6670
env:
6771
DEVELOPER_DIR: ${{ env.CI_XCODE_13 }}
6872

@@ -87,6 +91,7 @@ jobs:
8791
with:
8892
files: ${{join(fromJSON(steps.coverage-files.outputs.files), ',')}}
8993
env_vars: TVOS
94+
fail_ci_if_error: true
9095
env:
9196
DEVELOPER_DIR: ${{ env.CI_XCODE_13 }}
9297

ParseSwift.xcodeproj/project.pbxproj

+24-18
Original file line numberDiff line numberDiff line change
@@ -2844,8 +2844,9 @@
28442844
isa = XCBuildConfiguration;
28452845
buildSettings = {
28462846
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
2847+
CLANG_ENABLE_CODE_COVERAGE = NO;
28472848
CODE_SIGN_STYLE = Automatic;
2848-
GCC_GENERATE_TEST_COVERAGE_FILES = YES;
2849+
GCC_GENERATE_TEST_COVERAGE_FILES = NO;
28492850
INFOPLIST_FILE = TestHost/Info.plist;
28502851
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
28512852
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
@@ -2860,8 +2861,9 @@
28602861
isa = XCBuildConfiguration;
28612862
buildSettings = {
28622863
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
2864+
CLANG_ENABLE_CODE_COVERAGE = NO;
28632865
CODE_SIGN_STYLE = Automatic;
2864-
GCC_GENERATE_TEST_COVERAGE_FILES = YES;
2866+
GCC_GENERATE_TEST_COVERAGE_FILES = NO;
28652867
INFOPLIST_FILE = TestHost/Info.plist;
28662868
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
28672869
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
@@ -2912,6 +2914,7 @@
29122914
ENABLE_TESTABILITY = YES;
29132915
GCC_C_LANGUAGE_STANDARD = gnu11;
29142916
GCC_DYNAMIC_NO_PIC = NO;
2917+
GCC_GENERATE_TEST_COVERAGE_FILES = NO;
29152918
GCC_NO_COMMON_BLOCKS = YES;
29162919
GCC_OPTIMIZATION_LEVEL = 0;
29172920
GCC_PREPROCESSOR_DEFINITIONS = (
@@ -2976,6 +2979,7 @@
29762979
ENABLE_NS_ASSERTIONS = NO;
29772980
ENABLE_STRICT_OBJC_MSGSEND = YES;
29782981
GCC_C_LANGUAGE_STANDARD = gnu11;
2982+
GCC_GENERATE_TEST_COVERAGE_FILES = NO;
29792983
GCC_NO_COMMON_BLOCKS = YES;
29802984
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
29812985
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
@@ -3003,7 +3007,7 @@
30033007
DYLIB_COMPATIBILITY_VERSION = 1;
30043008
DYLIB_CURRENT_VERSION = 1;
30053009
DYLIB_INSTALL_NAME_BASE = "@rpath";
3006-
GCC_GENERATE_TEST_COVERAGE_FILES = YES;
3010+
GCC_GENERATE_TEST_COVERAGE_FILES = NO;
30073011
INFOPLIST_FILE = "ParseSwift-iOS/Info.plist";
30083012
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
30093013
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
@@ -3028,7 +3032,7 @@
30283032
DYLIB_COMPATIBILITY_VERSION = 1;
30293033
DYLIB_CURRENT_VERSION = 1;
30303034
DYLIB_INSTALL_NAME_BASE = "@rpath";
3031-
GCC_GENERATE_TEST_COVERAGE_FILES = YES;
3035+
GCC_GENERATE_TEST_COVERAGE_FILES = NO;
30323036
INFOPLIST_FILE = "ParseSwift-iOS/Info.plist";
30333037
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
30343038
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
@@ -3053,7 +3057,7 @@
30533057
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "-";
30543058
CODE_SIGN_STYLE = Manual;
30553059
DEVELOPMENT_TEAM = "";
3056-
GCC_GENERATE_TEST_COVERAGE_FILES = YES;
3060+
GCC_GENERATE_TEST_COVERAGE_FILES = NO;
30573061
INFOPLIST_FILE = Tests/ParseSwiftTests/Info.plist;
30583062
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
30593063
PRODUCT_BUNDLE_IDENTIFIER = com.parse.ParseSwiftTests;
@@ -3074,7 +3078,7 @@
30743078
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "-";
30753079
CODE_SIGN_STYLE = Manual;
30763080
DEVELOPMENT_TEAM = "";
3077-
GCC_GENERATE_TEST_COVERAGE_FILES = YES;
3081+
GCC_GENERATE_TEST_COVERAGE_FILES = NO;
30783082
INFOPLIST_FILE = Tests/ParseSwiftTests/Info.plist;
30793083
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
30803084
PRODUCT_BUNDLE_IDENTIFIER = com.parse.ParseSwiftTests;
@@ -3097,7 +3101,7 @@
30973101
DYLIB_CURRENT_VERSION = 1;
30983102
DYLIB_INSTALL_NAME_BASE = "@rpath";
30993103
FRAMEWORK_VERSION = A;
3100-
GCC_GENERATE_TEST_COVERAGE_FILES = YES;
3104+
GCC_GENERATE_TEST_COVERAGE_FILES = NO;
31013105
INFOPLIST_FILE = "ParseSwift-macOS/Info.plist";
31023106
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
31033107
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks";
@@ -3124,7 +3128,7 @@
31243128
DYLIB_CURRENT_VERSION = 1;
31253129
DYLIB_INSTALL_NAME_BASE = "@rpath";
31263130
FRAMEWORK_VERSION = A;
3127-
GCC_GENERATE_TEST_COVERAGE_FILES = YES;
3131+
GCC_GENERATE_TEST_COVERAGE_FILES = NO;
31283132
INFOPLIST_FILE = "ParseSwift-macOS/Info.plist";
31293133
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
31303134
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks";
@@ -3146,9 +3150,10 @@
31463150
buildSettings = {
31473151
ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image";
31483152
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
3153+
CLANG_ENABLE_CODE_COVERAGE = NO;
31493154
CLANG_ENABLE_OBJC_WEAK = YES;
31503155
CODE_SIGN_STYLE = Automatic;
3151-
GCC_GENERATE_TEST_COVERAGE_FILES = YES;
3156+
GCC_GENERATE_TEST_COVERAGE_FILES = NO;
31523157
INFOPLIST_FILE = TestHostTV/Info.plist;
31533158
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
31543159
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
@@ -3167,9 +3172,10 @@
31673172
buildSettings = {
31683173
ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image";
31693174
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
3175+
CLANG_ENABLE_CODE_COVERAGE = NO;
31703176
CLANG_ENABLE_OBJC_WEAK = YES;
31713177
CODE_SIGN_STYLE = Automatic;
3172-
GCC_GENERATE_TEST_COVERAGE_FILES = YES;
3178+
GCC_GENERATE_TEST_COVERAGE_FILES = NO;
31733179
INFOPLIST_FILE = TestHostTV/Info.plist;
31743180
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
31753181
MTL_FAST_MATH = YES;
@@ -3188,7 +3194,7 @@
31883194
CLANG_ENABLE_OBJC_WEAK = YES;
31893195
CODE_SIGN_STYLE = Manual;
31903196
DEVELOPMENT_TEAM = "";
3191-
GCC_GENERATE_TEST_COVERAGE_FILES = YES;
3197+
GCC_GENERATE_TEST_COVERAGE_FILES = NO;
31923198
INFOPLIST_FILE = ParseSwiftTeststvOS/Info.plist;
31933199
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
31943200
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
@@ -3210,7 +3216,7 @@
32103216
CLANG_ENABLE_OBJC_WEAK = YES;
32113217
CODE_SIGN_STYLE = Manual;
32123218
DEVELOPMENT_TEAM = "";
3213-
GCC_GENERATE_TEST_COVERAGE_FILES = YES;
3219+
GCC_GENERATE_TEST_COVERAGE_FILES = NO;
32143220
INFOPLIST_FILE = ParseSwiftTeststvOS/Info.plist;
32153221
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
32163222
MTL_FAST_MATH = YES;
@@ -3233,7 +3239,7 @@
32333239
CODE_SIGN_STYLE = Manual;
32343240
COMBINE_HIDPI_IMAGES = YES;
32353241
DEVELOPMENT_TEAM = "";
3236-
GCC_GENERATE_TEST_COVERAGE_FILES = YES;
3242+
GCC_GENERATE_TEST_COVERAGE_FILES = NO;
32373243
INFOPLIST_FILE = ParseSwiftTestsmacOS/Info.plist;
32383244
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
32393245
MACOSX_DEPLOYMENT_TARGET = 10.15;
@@ -3255,7 +3261,7 @@
32553261
CODE_SIGN_STYLE = Manual;
32563262
COMBINE_HIDPI_IMAGES = YES;
32573263
DEVELOPMENT_TEAM = "";
3258-
GCC_GENERATE_TEST_COVERAGE_FILES = YES;
3264+
GCC_GENERATE_TEST_COVERAGE_FILES = NO;
32593265
INFOPLIST_FILE = ParseSwiftTestsmacOS/Info.plist;
32603266
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
32613267
MACOSX_DEPLOYMENT_TARGET = 10.15;
@@ -3279,7 +3285,7 @@
32793285
DYLIB_COMPATIBILITY_VERSION = 1;
32803286
DYLIB_CURRENT_VERSION = 1;
32813287
DYLIB_INSTALL_NAME_BASE = "@rpath";
3282-
GCC_GENERATE_TEST_COVERAGE_FILES = YES;
3288+
GCC_GENERATE_TEST_COVERAGE_FILES = NO;
32833289
INFOPLIST_FILE = "ParseSwift-watchOS/Info.plist";
32843290
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
32853291
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
@@ -3309,7 +3315,7 @@
33093315
DYLIB_COMPATIBILITY_VERSION = 1;
33103316
DYLIB_CURRENT_VERSION = 1;
33113317
DYLIB_INSTALL_NAME_BASE = "@rpath";
3312-
GCC_GENERATE_TEST_COVERAGE_FILES = YES;
3318+
GCC_GENERATE_TEST_COVERAGE_FILES = NO;
33133319
INFOPLIST_FILE = "ParseSwift-watchOS/Info.plist";
33143320
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
33153321
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
@@ -3337,7 +3343,7 @@
33373343
DYLIB_COMPATIBILITY_VERSION = 1;
33383344
DYLIB_CURRENT_VERSION = 1;
33393345
DYLIB_INSTALL_NAME_BASE = "@rpath";
3340-
GCC_GENERATE_TEST_COVERAGE_FILES = YES;
3346+
GCC_GENERATE_TEST_COVERAGE_FILES = NO;
33413347
INFOPLIST_FILE = "ParseSwift-tvOS/Info.plist";
33423348
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
33433349
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
@@ -3366,7 +3372,7 @@
33663372
DYLIB_COMPATIBILITY_VERSION = 1;
33673373
DYLIB_CURRENT_VERSION = 1;
33683374
DYLIB_INSTALL_NAME_BASE = "@rpath";
3369-
GCC_GENERATE_TEST_COVERAGE_FILES = YES;
3375+
GCC_GENERATE_TEST_COVERAGE_FILES = NO;
33703376
INFOPLIST_FILE = "ParseSwift-tvOS/Info.plist";
33713377
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
33723378
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";

Sources/ParseSwift/Authentication/3rd Party/ParseApple/ParseApple.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public struct ParseApple<AuthenticatedUser: ParseUser>: ParseAuthentication {
1919

2020
/// Authentication keys required for Apple authentication.
2121
enum AuthenticationKeys: String, Codable {
22-
case id // swiftlint:disable:this identifier_name
22+
case id
2323
case token
2424

2525
/// Properly makes an authData dictionary with the required keys.

Sources/ParseSwift/Authentication/3rd Party/ParseFacebook/ParseFacebook.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public struct ParseFacebook<AuthenticatedUser: ParseUser>: ParseAuthentication {
1818

1919
/// Authentication keys required for Facebook authentication.
2020
enum AuthenticationKeys: String, Codable {
21-
case id // swiftlint:disable:this identifier_name
21+
case id
2222
case authenticationToken = "token"
2323
case accessToken = "access_token"
2424
case expirationDate = "expiration_date"

Sources/ParseSwift/Authentication/3rd Party/ParseLDAP/ParseLDAP+async.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public extension ParseLDAP {
2020
- returns: An instance of the logged in `ParseUser`.
2121
- throws: `ParseError`.
2222
*/
23-
func login(id: String, // swiftlint:disable:this identifier_name
23+
func login(id: String,
2424
password: String,
2525
options: API.Options = []) async throws -> AuthenticatedUser {
2626
try await withCheckedThrowingContinuation { continuation in
@@ -59,7 +59,7 @@ public extension ParseLDAP {
5959
- returns: An instance of the logged in `ParseUser`.
6060
- throws: `ParseError`.
6161
*/
62-
func link(id: String, // swiftlint:disable:this identifier_name
62+
func link(id: String,
6363
password: String,
6464
options: API.Options = []) async throws -> AuthenticatedUser {
6565
try await withCheckedThrowingContinuation { continuation in

Sources/ParseSwift/Authentication/3rd Party/ParseLDAP/ParseLDAP+combine.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public extension ParseLDAP {
1919
- parameter options: A set of header options sent to the server. Defaults to an empty set.
2020
- returns: A publisher that eventually produces a single value and then finishes or fails.
2121
*/
22-
func loginPublisher(id: String, // swiftlint:disable:this identifier_name
22+
func loginPublisher(id: String,
2323
password: String,
2424
options: API.Options = []) -> Future<AuthenticatedUser, ParseError> {
2525
Future { promise in
@@ -55,7 +55,7 @@ public extension ParseLDAP {
5555
- parameter options: A set of header options sent to the server. Defaults to an empty set.
5656
- returns: A publisher that eventually produces a single value and then finishes or fails.
5757
*/
58-
func linkPublisher(id: String, // swiftlint:disable:this identifier_name
58+
func linkPublisher(id: String,
5959
password: String,
6060
options: API.Options = []) -> Future<AuthenticatedUser, ParseError> {
6161
Future { promise in

Sources/ParseSwift/Authentication/3rd Party/ParseLDAP/ParseLDAP.swift

+4-4
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,14 @@ public struct ParseLDAP<AuthenticatedUser: ParseUser>: ParseAuthentication {
1818

1919
/// Authentication keys required for LDAP authentication.
2020
enum AuthenticationKeys: String, Codable {
21-
case id // swiftlint:disable:this identifier_name
21+
case id
2222
case password
2323

2424
/// Properly makes an authData dictionary with the required keys.
2525
/// - parameter id: Required id.
2626
/// - parameter password: Required password.
2727
/// - returns: authData dictionary.
28-
func makeDictionary(id: String, // swiftlint:disable:this identifier_name
28+
func makeDictionary(id: String,
2929
password: String) -> [String: String] {
3030
[AuthenticationKeys.id.rawValue: id,
3131
AuthenticationKeys.password.rawValue: password]
@@ -58,7 +58,7 @@ public extension ParseLDAP {
5858
- parameter callbackQueue: The queue to return to after completion. Default value of .main.
5959
- parameter completion: The block to execute.
6060
*/
61-
func login(id: String, // swiftlint:disable:this identifier_name
61+
func login(id: String,
6262
password: String,
6363
options: API.Options = [],
6464
callbackQueue: DispatchQueue = .main,
@@ -100,7 +100,7 @@ public extension ParseLDAP {
100100
- parameter callbackQueue: The queue to return to after completion. Default value of .main.
101101
- parameter completion: The block to execute.
102102
*/
103-
func link(id: String, // swiftlint:disable:this identifier_name
103+
func link(id: String,
104104
password: String,
105105
options: API.Options = [],
106106
callbackQueue: DispatchQueue = .main,

Sources/ParseSwift/Authentication/3rd Party/ParseTwitter/ParseTwitter.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public struct ParseTwitter<AuthenticatedUser: ParseUser>: ParseAuthentication {
2020

2121
/// Authentication keys required for Twitter authentication.
2222
enum AuthenticationKeys: String, Codable {
23-
case id // swiftlint:disable:this identifier_name
23+
case id
2424
case consumerKey = "consumer_key"
2525
case consumerSecret = "consumer_secret"
2626
case authToken = "auth_token"

Sources/ParseSwift/Authentication/Internal/ParseAnonymous.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ import Foundation
2929
public struct ParseAnonymous<AuthenticatedUser: ParseUser>: ParseAuthentication {
3030

3131
enum AuthenticationKeys: String, Codable {
32-
case id // swiftlint:disable:this identifier_name
32+
case id
3333

3434
func makeDictionary() -> [String: String] {
3535
[AuthenticationKeys.id.rawValue: UUID().uuidString.lowercased()]

Sources/ParseSwift/Objects/ParseObject.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public extension ParseObject {
6262
as models in MVVM and SwiftUI.
6363
- note: `id` allows `ParseObjects`'s to be used even if they are unsaved and do not have an `objectId`.
6464
*/
65-
var id: String { // swiftlint:disable:this identifier_name
65+
var id: String {
6666
guard let objectId = self.objectId else {
6767
return UUID().uuidString
6868
}

Sources/ParseSwift/Types/ParseFile.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public struct ParseFile: Fileable, Savable, Fetchable, Deletable, Hashable {
1818
&& data == nil
1919
}
2020

21-
public var id: UUID // swiftlint:disable:this identifier_name
21+
public var id: UUID
2222

2323
/**
2424
The name of the file.

0 commit comments

Comments
 (0)