diff --git a/.github/workflows/scheduled-upload-crowdin.yml b/.github/workflows/scheduled-upload-crowdin.yml index a793d6b6f7..4e47cf8347 100644 --- a/.github/workflows/scheduled-upload-crowdin.yml +++ b/.github/workflows/scheduled-upload-crowdin.yml @@ -6,10 +6,10 @@ on: jobs: CrowdinUpload: - runs-on: macos-latest + runs-on: macos-14 steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: ref: develop - name: Setup Ruby diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml new file mode 100644 index 0000000000..5d6ac1a838 --- /dev/null +++ b/.github/workflows/unit-test.yml @@ -0,0 +1,27 @@ +name: unit-test + +on: + pull_request: + +jobs: + UnitTest: + runs-on: macos-14 + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Setup Xcode + uses: maxim-lobanov/setup-xcode@v1 + with: + xcode-version: 15 + - name: Setup Ruby + uses: ruby/setup-ruby@v1 + with: + working-directory: src + bundler-cache: true + - name: Test + run: cd src && bundle exec fastlane ios unittests + - name: Test Report + uses: test-summary/action@v2 + if: always() + with: + paths: src/fastlane/test_output/report.junit \ No newline at end of file diff --git a/src/.ruby-version b/src/.ruby-version index 15a2799817..fa7adc7ac7 100644 --- a/src/.ruby-version +++ b/src/.ruby-version @@ -1 +1 @@ -3.3.0 +3.3.5 diff --git a/src/Catty.xcodeproj/CattyTestplan.xctestplan b/src/Catty.xcodeproj/Tests.xctestplan similarity index 85% rename from src/Catty.xcodeproj/CattyTestplan.xctestplan rename to src/Catty.xcodeproj/Tests.xctestplan index 7c7dd09d49..3a9ad6a5ff 100644 --- a/src/Catty.xcodeproj/CattyTestplan.xctestplan +++ b/src/Catty.xcodeproj/Tests.xctestplan @@ -42,14 +42,6 @@ "identifier" : "CA7698A91B0E4A97000D0340", "name" : "CattyTests" } - }, - { - "parallelizable" : true, - "target" : { - "containerPath" : "container:Catty.xcodeproj", - "identifier" : "AAADA0031B9B29D500E0CA9A", - "name" : "CattyUITests" - } } ], "version" : 1 diff --git a/src/Catty.xcodeproj/UITests.xctestplan b/src/Catty.xcodeproj/UITests.xctestplan new file mode 100644 index 0000000000..c7fc1c2214 --- /dev/null +++ b/src/Catty.xcodeproj/UITests.xctestplan @@ -0,0 +1,42 @@ +{ + "configurations" : [ + { + "id" : "1C9A3BFC-D3BD-40C9-B224-A0EBD3A4FDBF", + "name" : "Fastlane", + "options" : { + "diagnosticCollectionPolicy" : "Never", + "mainThreadCheckerEnabled" : false, + "maximumTestRepetitions" : 3, + "testRepetitionMode" : "retryOnFailure", + "uiTestingScreenshotsLifetime" : "keepNever", + "userAttachmentLifetime" : "keepNever" + } + } + ], + "defaultOptions" : { + "codeCoverage" : false, + "environmentVariableEntries" : [ + { + "enabled" : false, + "key" : "OS_ACTIVITY_MODE", + "value" : "disable" + } + ], + "targetForVariableExpansion" : { + "containerPath" : "container:Catty.xcodeproj", + "identifier" : "CADBD6D319B0E8C200C62836", + "name" : "Catty" + } + }, + "testTargets" : [ + { + "parallelizable" : true, + "target" : { + "containerPath" : "container:Catty.xcodeproj", + "identifier" : "AAADA0031B9B29D500E0CA9A", + "name" : "CattyUITests" + } + } + ], + "version" : 1 +} diff --git a/src/Catty.xcodeproj/project.pbxproj b/src/Catty.xcodeproj/project.pbxproj index 43b60d94f3..ad884b36fb 100644 --- a/src/Catty.xcodeproj/project.pbxproj +++ b/src/Catty.xcodeproj/project.pbxproj @@ -2225,6 +2225,7 @@ 1764E6372A06CC940013102B /* SoundRecorderViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SoundRecorderViewController.swift; sourceTree = ""; }; 17A8AC642644E6A900DDD480 /* ForceInit.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ForceInit.m; sourceTree = ""; }; 17A8AC6B2644E6B500DDD480 /* ForceInit.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ForceInit.h; sourceTree = ""; }; + 17C90C142CB74DA100303599 /* UITests.xctestplan */ = {isa = PBXFileReference; lastKnownFileType = text; name = UITests.xctestplan; path = Catty.xcodeproj/UITests.xctestplan; sourceTree = ""; }; 17D5F5BD265E927A00C678FF /* Keychain.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = Keychain.swift; path = Keychain/Keychain.swift; sourceTree = ""; }; 17D5F5BF265EAEF700C678FF /* KeychainTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KeychainTests.swift; sourceTree = ""; }; 1801591D25E4D5CE00E5B673 /* FormulaEditorSectionViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FormulaEditorSectionViewController.swift; sourceTree = ""; }; @@ -3390,7 +3391,7 @@ 7A7C5B407D7B4FD7DA1E1DBD /* hr */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.strings; name = hr; path = hr.lproj/Localizable.strings; sourceTree = ""; }; 7B014D0329E0ADE5004AA0E0 /* StoreAuthenticator.deleteUser.success.refresh.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = StoreAuthenticator.deleteUser.success.refresh.json; sourceTree = ""; }; 7B014D0429E0ADE5004AA0E0 /* StoreAuthenticator.deleteUser.success.upgrade.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = StoreAuthenticator.deleteUser.success.upgrade.json; sourceTree = ""; }; - 7B014D0E29E7122E004AA0E0 /* CattyTestplan.xctestplan */ = {isa = PBXFileReference; lastKnownFileType = text; name = CattyTestplan.xctestplan; path = Catty.xcodeproj/CattyTestplan.xctestplan; sourceTree = ""; }; + 7B014D0E29E7122E004AA0E0 /* Tests.xctestplan */ = {isa = PBXFileReference; lastKnownFileType = text; name = Tests.xctestplan; path = Catty.xcodeproj/Tests.xctestplan; sourceTree = ""; }; 7B09EB6529B1DF8200590F3D /* RegisterViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RegisterViewController.swift; sourceTree = ""; }; 7B09EB6629B1DF8200590F3D /* BaseAuthenticationViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BaseAuthenticationViewController.swift; sourceTree = ""; }; 7B09EB6729B1DF8200590F3D /* LoginViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LoginViewController.swift; sourceTree = ""; }; @@ -5077,7 +5078,8 @@ 92FF32C11A24E33B00093DA7 /* Storyboard+XIB */, 29B97315FDCFA39411CA2CEA /* Supporting Files */, B43498471927A3AB002F9075 /* Resources */, - 7B014D0E29E7122E004AA0E0 /* CattyTestplan.xctestplan */, + 7B014D0E29E7122E004AA0E0 /* Tests.xctestplan */, + 17C90C142CB74DA100303599 /* UITests.xctestplan */, B46B270317703F9400172837 /* CattyTests */, AAADA0051B9B29D500E0CA9A /* CattyUITests */, 187E07A124E26CED00E652C4 /* CattyUISnapshots */, diff --git a/src/Catty.xcodeproj/xcshareddata/xcschemes/Catty (DEBUG).xcscheme b/src/Catty.xcodeproj/xcshareddata/xcschemes/Catty (DEBUG).xcscheme index 68f5a85d84..de460b45e4 100644 --- a/src/Catty.xcodeproj/xcshareddata/xcschemes/Catty (DEBUG).xcscheme +++ b/src/Catty.xcodeproj/xcshareddata/xcschemes/Catty (DEBUG).xcscheme @@ -68,9 +68,12 @@ + + = 2.0.2, < 6.0) - artifactory (3.0.15) + addressable (2.8.7) + public_suffix (>= 2.0.2, < 7.0) + artifactory (3.0.17) atomos (0.1.3) aws-eventstream (1.3.0) - aws-partitions (1.882.0) - aws-sdk-core (3.190.3) + aws-partitions (1.990.0) + aws-sdk-core (3.209.1) aws-eventstream (~> 1, >= 1.3.0) aws-partitions (~> 1, >= 1.651.0) - aws-sigv4 (~> 1.8) + aws-sigv4 (~> 1.9) jmespath (~> 1, >= 1.6.1) - aws-sdk-kms (1.76.0) - aws-sdk-core (~> 3, >= 3.188.0) - aws-sigv4 (~> 1.1) - aws-sdk-s3 (1.142.0) - aws-sdk-core (~> 3, >= 3.189.0) + aws-sdk-kms (1.94.0) + aws-sdk-core (~> 3, >= 3.207.0) + aws-sigv4 (~> 1.5) + aws-sdk-s3 (1.167.0) + aws-sdk-core (~> 3, >= 3.207.0) aws-sdk-kms (~> 1) - aws-sigv4 (~> 1.8) - aws-sigv4 (1.8.0) + aws-sigv4 (~> 1.5) + aws-sigv4 (1.10.0) aws-eventstream (~> 1, >= 1.0.2) babosa (1.0.4) + base64 (0.2.0) claide (1.1.0) colored (1.2) colored2 (3.1.2) @@ -35,8 +38,8 @@ GEM domain_name (0.6.20240107) dotenv (2.8.1) emoji_regex (3.2.3) - excon (0.109.0) - faraday (1.10.3) + excon (0.112.0) + faraday (1.10.4) faraday-em_http (~> 1.0) faraday-em_synchrony (~> 1.0) faraday-excon (~> 1.1) @@ -57,22 +60,22 @@ GEM faraday-httpclient (1.0.1) faraday-multipart (1.0.4) multipart-post (~> 2) - faraday-net_http (1.0.1) + faraday-net_http (1.0.2) faraday-net_http_persistent (1.2.0) faraday-patron (1.0.0) faraday-rack (1.0.0) faraday-retry (1.0.3) - faraday_middleware (1.2.0) + faraday_middleware (1.2.1) faraday (~> 1.0) - fastimage (2.3.0) - fastlane (2.219.0) + fastimage (2.3.1) + fastlane (2.224.0) CFPropertyList (>= 2.3, < 4.0.0) addressable (>= 2.8, < 3.0.0) artifactory (~> 3.0) aws-sdk-s3 (~> 1.0) babosa (>= 1.0.3, < 2.0.0) bundler (>= 1.12.0, < 3.0.0) - colored + colored (~> 1.2) commander (~> 4.6) dotenv (>= 2.1.1, < 3.0.0) emoji_regex (>= 0.1, < 4.0) @@ -93,10 +96,10 @@ GEM mini_magick (>= 4.9.4, < 5.0.0) multipart-post (>= 2.0.0, < 3.0.0) naturally (~> 2.2) - optparse (>= 0.1.1) + optparse (>= 0.1.1, < 1.0.0) plist (>= 3.1.0, < 4.0.0) rubyzip (>= 2.0.0, < 3.0.0) - security (= 0.1.3) + security (= 0.1.5) simctl (~> 1.6.3) terminal-notifier (>= 2.0.0, < 3.0.0) terminal-table (~> 3) @@ -105,8 +108,8 @@ GEM word_wrap (~> 1.0.0) xcodeproj (>= 1.13.0, < 2.0.0) xcpretty (~> 0.3.0) - xcpretty-travis-formatter (>= 0.0.3) - fastlane-plugin-browserstack (0.3.2) + xcpretty-travis-formatter (>= 0.0.3, < 2.0.0) + fastlane-plugin-browserstack (0.3.3) rest-client (~> 2.0, >= 2.0.2) gh_inspector (1.1.3) google-apis-androidpublisher_v3 (0.54.0) @@ -125,12 +128,12 @@ GEM google-apis-core (>= 0.11.0, < 2.a) google-apis-storage_v1 (0.31.0) google-apis-core (>= 0.11.0, < 2.a) - google-cloud-core (1.6.1) + google-cloud-core (1.7.1) google-cloud-env (>= 1.0, < 3.a) google-cloud-errors (~> 1.0) google-cloud-env (1.6.0) faraday (>= 0.17.3, < 3.0) - google-cloud-errors (1.3.1) + google-cloud-errors (1.4.0) google-cloud-storage (1.47.0) addressable (~> 2.8) digest-crc (~> 0.4) @@ -147,27 +150,31 @@ GEM signet (>= 0.16, < 2.a) highline (2.0.3) http-accept (1.7.0) - http-cookie (1.0.5) + http-cookie (1.0.7) domain_name (~> 0.5) httpclient (2.8.3) jmespath (1.6.2) - json (2.7.1) - jwt (2.7.1) - mime-types (3.5.2) + json (2.7.2) + jwt (2.9.3) + base64 + logger (1.6.1) + mime-types (3.6.0) + logger mime-types-data (~> 3.2015) - mime-types-data (3.2023.1205) - mini_magick (4.12.0) + mime-types-data (3.2024.1001) + mini_magick (4.13.2) mini_mime (1.1.5) multi_json (1.15.0) - multipart-post (2.3.0) + multipart-post (2.4.1) nanaimo (0.3.0) naturally (2.2.1) netrc (0.11.0) - optparse (0.4.0) + nkf (0.2.0) + optparse (0.5.0) os (1.1.4) plist (3.7.1) - public_suffix (5.0.4) - rake (13.1.0) + public_suffix (6.0.1) + rake (13.2.1) representable (3.2.0) declarative (< 0.1.0) trailblazer-option (>= 0.1.1, < 0.2.0) @@ -178,12 +185,12 @@ GEM mime-types (>= 1.16, < 4.0) netrc (~> 0.8) retriable (3.1.2) - rexml (3.2.6) + rexml (3.3.8) rouge (2.0.7) ruby2_keywords (0.0.5) rubyzip (2.3.2) - security (0.1.3) - signet (0.18.0) + security (0.1.5) + signet (0.19.0) addressable (~> 2.8) faraday (>= 0.17.5, < 3.a) jwt (>= 1.5, < 3.0) @@ -200,15 +207,15 @@ GEM tty-spinner (0.9.3) tty-cursor (~> 0.7) uber (0.1.0) - unicode-display_width (2.5.0) + unicode-display_width (2.6.0) word_wrap (1.0.0) - xcodeproj (1.23.0) + xcodeproj (1.25.1) CFPropertyList (>= 2.3.3, < 4.0) atomos (~> 0.1.3) claide (>= 1.0.2, < 2.0) colored2 (~> 3.1) nanaimo (~> 0.3.0) - rexml (~> 3.2.4) + rexml (>= 3.3.6, < 4.0) xcpretty (0.3.0) rouge (~> 2.0.7) xcpretty-travis-formatter (1.0.1) @@ -223,4 +230,4 @@ DEPENDENCIES fastlane-plugin-browserstack BUNDLED WITH - 2.5.5 + 2.5.21 diff --git a/src/RunScripts/license-validator.swift b/src/RunScripts/license-validator.swift index 5abed84924..61c40f388f 100644 --- a/src/RunScripts/license-validator.swift +++ b/src/RunScripts/license-validator.swift @@ -72,73 +72,25 @@ enum License: String { } let license3rdPartyDict: [String: License] = [ - "LLNode": .MIT, + "BDKNotifyHUD": .MIT, "CBStack": .MIT, - "OrderedDictionary": .zlib, - "NSString+FastImageSize": .MIT, - "UIViewController+CWPopup": .MIT, + "EVCircularProgressView": .MIT, "GDataXMLNode": .Apache2, - "JNKeychain": .MIT, - "SwellAll": .Apache2, - "crypt": .BSD, - "ioapi": .zlib, - "mztools": .zlib, - "unzip": .zlib, - "zip": .zlib, "ImageHelper": .MIT, - "Reachability": .Apple, - "SharkfoodMuteSwitchDetector": .MIT, - "Siren": .MIT, - "SSZipArchive": .MIT, "LCTableViewPickerControl": .MIT, "LinkedListStack": .MIT, + "LLNode": .MIT, + "LXReorderableCollectionViewFlowLayout": .MIT, "NKOColorPickerView": .MIT, + "NSString+FastImageSize": .MIT, + "OrderedDictionary": .zlib, + "SnapshotHelper": .MIT, "SPUserResizableView": .MIT, + "SwellAll": .Apache2, "UIImage+FloodFill": .MIT, "UIViewController+KNSemiModal": .MIT, "YKImageCropperOverlayView": .MIT, - "YKImageCropperView": .MIT, - "AHKActionSheet": .MIT, - "AHKActionSheetViewController": .MIT, - "UIImage+AHKAdditions": .MIT, - "UIWindow+AHKAdditions": .MIT, - "BDKNotifyHUD": .MIT, - "EVCircularProgressView": .MIT, - "FXBlurView": .zlib, - "IBActionSheet": .MIT, - "LXReorderableCollectionViewFlowLayout": .MIT, - "MYIntroductionPanel": .MIT, - "TTTAttributedLabel": .MIT, - "MXPagerView": .MIT, - "MXPagerViewController": .MIT, - "MXParallaxHeader": .MIT, - "MXScrollView": .MIT, - "MXScrollViewController": .MIT, - "AudioKit": .MIT, - "SnapshotHelper": .MIT, - "ScratchSampleInstruments": .BSD -] - -let licenseCheckDirs: [String: License] = [ - "Bohr": .MIT, - "HMSegmentedControl": .MIT, - "PureLayout": .MIT, - "M13ProgressSuite": .MIT, - "MXSegmentedPager": .MIT, - "Target Support Files": .MIT, - "VGParallaxHeader": .MIT, - "TOCropViewController": .MIT -] - -let checkDirs: [String] = [ - "Bohr", - "HMSegmentedControl", - "PureLayout", - "M13ProgressSuite", - "MXSegmentedPager", - "Target Support Files", - "VGParallaxHeader", - "TOCropViewController" + "YKImageCropperView": .MIT ] let compatibleLicenses: [License] = [ @@ -173,8 +125,6 @@ func checkLicenseOfFile(_ filePath: String) { let range = content.range(of: licenseSearchStringCurrentYear) if range == nil { isExternalLibrary = true - //let removedFileName = (filePath as NSString).stringByDeletingLastPathComponent - //libraryName = (removedFileName as NSString).lastPathComponent libraryName = (filePath as NSString).lastPathComponent libraryName = (libraryName as NSString).deletingPathExtension } @@ -183,26 +133,6 @@ func checkLicenseOfFile(_ filePath: String) { } if isExternalLibrary { - for excludeDir in checkDirs { - let range = filePath.range(of: excludeDir) - if range != nil { - libraryName = excludeDir - guard let license = licenseCheckDirs[libraryName] else { - printErrorAndExitIfFailed("No license specified for library: \(libraryName). Please add the license also to our license folder", withFilePath: filePath) - return - } - - if license == .Unknown { - printWarning("Unknown License found. Not sure if compatible with PocketCode", withFilePath: filePath) - } else { - if !isValidLicense(license) { - printErrorAndExitIfFailed("License (\(license)) is not compatible with PockedCode.", withFilePath: filePath) - } - } - return - } - } - do { let content = try String(contentsOfFile: filePath, encoding: String.Encoding.utf8) let previousYear = content.range(of: licenseSearchStringPreviousYear) @@ -215,7 +145,7 @@ func checkLicenseOfFile(_ filePath: String) { } guard let license = license3rdPartyDict[libraryName] else { - printErrorAndExitIfFailed("No license specified for library: \(libraryName).Please add the license also to our license folder", withFilePath: filePath) + printErrorAndExitIfFailed("No license specified for library: \(libraryName). Please add the license also to our license folder", withFilePath: filePath) return } @@ -234,8 +164,8 @@ func checkLicenses() { let filePaths = getFilePaths() while let filePath = filePaths.nextObject() as? String { - // skip Build and DerivedData directories - if filePath.hasPrefix("Build") || filePath.hasPrefix("DerivedData") || filePath.hasPrefix("Carthage") { + // skip Build, DerivedData and bundler directories + if filePath.hasPrefix("Build") || filePath.hasPrefix("DerivedData") || filePath.hasPrefix("vendor/bundle") { continue } diff --git a/src/RunScripts/precompile-tests.swift b/src/RunScripts/precompile-tests.swift index 76ba5d8f71..68a6ca66db 100755 --- a/src/RunScripts/precompile-tests.swift +++ b/src/RunScripts/precompile-tests.swift @@ -36,71 +36,39 @@ let localizedStringCheckExcludeFiles = [ "LanguageTranslationDefines.h", "LanguageTranslationDefinesSwift.swift", "LanguageTranslationDefinesUI.swift", - "Functions.[hm]", - "Operators.m", - "BSKeyboardControls.m", "synchronize-localization.swift" ]; let localizedStringCheckExcludeFilesLine = #line; // CAVE: NEVER separate these two statements by adding a new line let localizedStringCheckSeparatedExcludeDirs = [ - "Pods", - "Carthage", "Build", - "DerivedData" + "DerivedData", + "vendor/bundle" ]; let localizedStringCheckSeparatedExcludeDirsLine = #line; // CAVE: NEVER separate these two statements by adding a new line let licenseCheckExcludeDirs = [ - "TTTAttributedLabel", - "minizip", - "SSZipArchive", - "GDataXMLNode", - "LXReorderableCollectionViewFlowLayout", - "AHKActionSheetViewController", - "AHKAdditions", - "IBActionSheet", - "SWCellScrollView", - "SWLongPressGestureRecognizer", - "SWTableViewCell", - "FXBlurView", - "BDKNotifyHUD", - "EVCircularProgressView", - "NSString+FastImageSize", - "UIViewController+CWPopup", - "OrderedDictionary", "3rdParty", - "PocketPaint", - "Carthage", "Build", "DerivedData", - "Siren", - "Pods", - "PodSource" + "vendor/bundle" ]; let licenseCheckExcludeDirsLine = #line; // CAVE: NEVER separate these two statements by adding a new line let licenseCheckExcludeFiles = [ - "AHKActionSheet.[mh]", - "AHKActionSheetViewController.[mh]", - "LXReorderableCollectionViewFlowLayout.[mh]", - "IBActionSheet.[mh]", - "Reachability.[mh]", - "SharkfoodMuteSwitchDetector.[mh]", - "SWCellScrollView.[mh]", - "SWUtilityButtonView.[mh]", - "UIImage+AHKAdditions.[mh]", - "UIWindow+AHKAdditions.[mh]", - "SWLongPressGestureRecognizer.[mh]", - "SWTableViewCell.[mh]", - "SWUtilityButtonTapGestureRecognizer.[mh]", - "SMPageControl.[mh]", - "EAIntroPage.[mh]", - "MYIntroductionPanel.[mh]", - "FBKVOController.[mh]", - "JNKeychain.[mh]", - "BOButtonTableViewCell.[mh]", - "MXPagerView-umbrella.[mh]", - "SwellAll.swift", + "GDataXMLNode.[mh]", + "ImageHelper.[mh]", + "LCTableViewPickerControl.[mh]", "license-validator.swift", + "LinkedListStack.[mh]", + "LXReorderableCollectionViewFlowLayout.[mh]", + "NKOColorPickerView.[mh]", + "NSString+FastImageSize.[mh]", + "OrderedDictionary.[mh]", "SnapshotHelper.swift", - "synchronize-localization.swift" + "SPUserResizableView.[mh]", + "SwellAll.swift", + "synchronize-localization.swift", + "UIImage+FloodFill.[mh]", + "UIViewController+KNSemiModal.[mh]", + "YKImageCropperOverlayView.[mh]", + "YKImageCropperView.[mh]" ]; let licenseCheckExcludeFilesLine = #line; // CAVE: NEVER separate these two statements by adding a new line let licenseSearchStringTemplate = "/**\n * Copyright (C) 2010-%d The Catrobat Team\n" diff --git a/src/fastlane/Fastfile b/src/fastlane/Fastfile index bbc84f219a..1c28e65103 100644 --- a/src/fastlane/Fastfile +++ b/src/fastlane/Fastfile @@ -93,6 +93,19 @@ platform :ios do # ########################################################################## + desc "Run Unittests" + lane :unittests do + run_tests( + project: "Catty.xcodeproj", + scheme: $catty_schemes["debug"], + testplan: "Tests", + device: "iPhone 15", + xcodebuild_formatter: "xcbeautify --renderer terminal", + output_remove_retry_attempts: true, + output_types: "junit" + ) + end + desc "Run tests" lane :tests do clear_derived_data diff --git a/src/fastlane/README.md b/src/fastlane/README.md index bbea9119d2..a6d25ec52d 100644 --- a/src/fastlane/README.md +++ b/src/fastlane/README.md @@ -39,6 +39,14 @@ Create builds at CI pipeline Upload Development Build to Browserstack +### ios unittests + +```sh +[bundle exec] fastlane ios unittests +``` + +Run Unittests + ### ios tests ```sh