From 7796ea7d850b22d34864b8be8d1c7c767b23b7b0 Mon Sep 17 00:00:00 2001 From: Gio Lodi Date: Tue, 4 Jun 2024 13:32:25 +1000 Subject: [PATCH 1/4] Ignore local `DerivedData` in SwiftLint --- .swiftlint.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.swiftlint.yml b/.swiftlint.yml index c93fce6f7..c600c8fc1 100644 --- a/.swiftlint.yml +++ b/.swiftlint.yml @@ -6,6 +6,7 @@ excluded: - fastlane - vendor - External + - DerivedData # Rules only_rules: @@ -53,8 +54,8 @@ only_rules: # Rules configuration -control_statement: - severity: error +control_statement: + severity: error custom_rules: From 130e19a10aaa9d6cdbbfd9e48478e691a20a9e72 Mon Sep 17 00:00:00 2001 From: Gio Lodi Date: Tue, 4 Jun 2024 13:18:34 +1000 Subject: [PATCH 2/4] Use Test Plan in unit tests scheme --- Simplenote.xcodeproj/project.pbxproj | 2 ++ .../xcschemes/Simplenote.xcscheme | 8 ++++- SimplenoteTests/Simplenote.xctestplan | 30 +++++++++++++++++++ 3 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 SimplenoteTests/Simplenote.xctestplan diff --git a/Simplenote.xcodeproj/project.pbxproj b/Simplenote.xcodeproj/project.pbxproj index b041032e5..d5e7bc08a 100644 --- a/Simplenote.xcodeproj/project.pbxproj +++ b/Simplenote.xcodeproj/project.pbxproj @@ -427,6 +427,7 @@ 37D4DD6920B3574C00C225EA /* WPAuthHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WPAuthHandler.h; sourceTree = ""; }; 37F742EA202A382400A47D3A /* AboutViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AboutViewController.swift; sourceTree = ""; }; 39ACEAE8218A03C6C22DC662 /* Pods-Automattic-Simplenote.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Automattic-Simplenote.release.xcconfig"; path = "Target Support Files/Pods-Automattic-Simplenote/Pods-Automattic-Simplenote.release.xcconfig"; sourceTree = ""; }; + 3F1FC4212C0EBEF10066B187 /* Simplenote.xctestplan */ = {isa = PBXFileReference; lastKnownFileType = text; path = Simplenote.xctestplan; sourceTree = ""; }; 466FFF2F17CC10A800399652 /* Simplenote.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Simplenote.app; sourceTree = BUILT_PRODUCTS_DIR; }; 469512CB17CD23100014A2BF /* Simplenote-Info-Hockey.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "Simplenote-Info-Hockey.plist"; sourceTree = ""; }; 46A0BEB8175BFD540050E864 /* Simplenote.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = Simplenote.entitlements; sourceTree = SOURCE_ROOT; }; @@ -1490,6 +1491,7 @@ B5CBB06A241976230003C271 /* SimplenoteTests */ = { isa = PBXGroup; children = ( + 3F1FC4212C0EBEF10066B187 /* Simplenote.xctestplan */, B53FF5482476F94B0014E928 /* Helpers */, B5EF32AF258D07420069EC7D /* Controllers */, B5985AD3242949C30044EDE9 /* Converters */, diff --git a/Simplenote.xcodeproj/xcshareddata/xcschemes/Simplenote.xcscheme b/Simplenote.xcodeproj/xcshareddata/xcschemes/Simplenote.xcscheme index b374474f0..5f05e2867 100644 --- a/Simplenote.xcodeproj/xcshareddata/xcschemes/Simplenote.xcscheme +++ b/Simplenote.xcodeproj/xcshareddata/xcschemes/Simplenote.xcscheme @@ -1,7 +1,7 @@ + version = "1.7"> @@ -36,6 +36,12 @@ ReferencedContainer = "container:Simplenote.xcodeproj"> + + + + Date: Tue, 4 Jun 2024 13:24:44 +1000 Subject: [PATCH 3/4] Do not run tests in parallel This solves the tests hanging. --- SimplenoteTests/Simplenote.xctestplan | 1 - 1 file changed, 1 deletion(-) diff --git a/SimplenoteTests/Simplenote.xctestplan b/SimplenoteTests/Simplenote.xctestplan index 65fbfb092..4017f8a4b 100644 --- a/SimplenoteTests/Simplenote.xctestplan +++ b/SimplenoteTests/Simplenote.xctestplan @@ -18,7 +18,6 @@ }, "testTargets" : [ { - "parallelizable" : true, "target" : { "containerPath" : "container:Simplenote.xcodeproj", "identifier" : "B5CBB068241976230003C271", From 6c59d1fa7c874a54c6c3e44f49e7409364908964 Mon Sep 17 00:00:00 2001 From: Gio Lodi Date: Tue, 4 Jun 2024 13:28:41 +1000 Subject: [PATCH 4/4] Remove redundant `CODE_SIGN_IDENTITY` definitions --- Simplenote.xcodeproj/project.pbxproj | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/Simplenote.xcodeproj/project.pbxproj b/Simplenote.xcodeproj/project.pbxproj index d5e7bc08a..191d08ca4 100644 --- a/Simplenote.xcodeproj/project.pbxproj +++ b/Simplenote.xcodeproj/project.pbxproj @@ -2438,8 +2438,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = "AppIcon-Beta"; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Simplenote/SimplenoteDebug.entitlements; - CODE_SIGN_IDENTITY = "Mac Developer"; - "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Mac Developer"; + CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Manual; COMBINE_HIDPI_IMAGES = YES; DEAD_CODE_STRIPPING = YES; @@ -2495,7 +2494,6 @@ CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Simplenote.entitlements; CODE_SIGN_IDENTITY = "Apple Distribution"; - "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Distribution"; CODE_SIGN_STYLE = Manual; COMBINE_HIDPI_IMAGES = YES; DEAD_CODE_STRIPPING = YES; @@ -2573,7 +2571,6 @@ CLANG_WARN_DOCUMENTATION_COMMENTS = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Manual; COMBINE_HIDPI_IMAGES = YES; DEAD_CODE_STRIPPING = YES; @@ -2618,7 +2615,6 @@ CLANG_WARN_DOCUMENTATION_COMMENTS = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Manual; COMBINE_HIDPI_IMAGES = YES; COPY_PHASE_STRIP = NO; @@ -2661,8 +2657,7 @@ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CODE_SIGN_ENTITLEMENTS = "IntentsExtension/Support Files/IntentsExtensionDebug.entitlements"; - CODE_SIGN_IDENTITY = "Mac Developer"; - "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Mac Developer"; + CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Manual; CURRENT_PROJECT_VERSION = 1; DEBUG_INFORMATION_FORMAT = dwarf; @@ -2717,7 +2712,6 @@ CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CODE_SIGN_ENTITLEMENTS = "IntentsExtension/Support Files/IntentsExtension.entitlements"; CODE_SIGN_IDENTITY = "Apple Distribution"; - "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Mac Developer"; CODE_SIGN_STYLE = Manual; COPY_PHASE_STRIP = NO; CURRENT_PROJECT_VERSION = 1;