diff --git a/.github/workflows/continuous_integration.yml b/.github/workflows/continuous_integration.yml index 3e935af..e12a3b0 100644 --- a/.github/workflows/continuous_integration.yml +++ b/.github/workflows/continuous_integration.yml @@ -25,7 +25,18 @@ jobs: run: bundle install - name: Unit tests + env: + FASTLANE_VERBOSE: "true" run: bundle exec fastlane unit_tests + + - name: Upload test results + if: success() || failure() + uses: actions/upload-artifact@v4 + with: + name: test-results + path: | + fastlane/test_output + test-results - name: Code Coverage run: bundle exec fastlane coverage diff --git a/IONFilesystemLib.xcodeproj/project.pbxproj b/IONFilesystemLib.xcodeproj/project.pbxproj index ce20d7c..792d4ce 100644 --- a/IONFilesystemLib.xcodeproj/project.pbxproj +++ b/IONFilesystemLib.xcodeproj/project.pbxproj @@ -12,7 +12,6 @@ 751328DB2D318E770031BDD0 /* MockFileManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 751328D82D3179430031BDD0 /* MockFileManager.swift */; }; 7575CF6A2BFCEE6F008F3FD0 /* IONFilesystemLib.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7575CF612BFCEE6F008F3FD0 /* IONFilesystemLib.framework */; }; 75DA44542D48E435006DF7DE /* IONFILEChunkPublisher.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75DA44532D48E435006DF7DE /* IONFILEChunkPublisher.swift */; }; - 75DA445A2D490051006DF7DE /* file_emojiContent.txt in Resources */ = {isa = PBXBuildFile; fileRef = 75DA44592D490051006DF7DE /* file_emojiContent.txt */; }; 75F8380B2D37E42000FCE044 /* IONFILEItemAttributeModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75F8380A2D37E42000FCE044 /* IONFILEItemAttributeModel.swift */; }; 75F84D662D39360E00892C89 /* IONFILEManager+Errors.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75F84D652D39360E00892C89 /* IONFILEManager+Errors.swift */; }; 75F84D682D39362F00892C89 /* IONFILEManager+Enums.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75F84D672D39362F00892C89 /* IONFILEManager+Enums.swift */; }; @@ -40,7 +39,6 @@ 7575CF612BFCEE6F008F3FD0 /* IONFilesystemLib.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = IONFilesystemLib.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 7575CF692BFCEE6F008F3FD0 /* IONFilesystemLibTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = IONFilesystemLibTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 75DA44532D48E435006DF7DE /* IONFILEChunkPublisher.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IONFILEChunkPublisher.swift; sourceTree = ""; }; - 75DA44592D490051006DF7DE /* file_emojiContent.txt */ = {isa = PBXFileReference; lastKnownFileType = text; path = file_emojiContent.txt; sourceTree = ""; }; 75F8380A2D37E42000FCE044 /* IONFILEItemAttributeModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IONFILEItemAttributeModel.swift; sourceTree = ""; }; 75F84D652D39360E00892C89 /* IONFILEManager+Errors.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "IONFILEManager+Errors.swift"; sourceTree = ""; }; 75F84D672D39362F00892C89 /* IONFILEManager+Enums.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "IONFILEManager+Enums.swift"; sourceTree = ""; }; @@ -109,7 +107,6 @@ 751328D92D318DBA0031BDD0 /* IONFILEDirectoryManagerTests.swift */, 75FEB2B32D35479B007C2686 /* IONFILEFileManagerTests.swift */, 75FEB2B62D355F21007C2686 /* file.txt */, - 75DA44592D490051006DF7DE /* file_emojiContent.txt */, ); path = IONFilesystemLibTests; sourceTree = ""; @@ -218,7 +215,6 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - 75DA445A2D490051006DF7DE /* file_emojiContent.txt in Resources */, 75FEB2B72D355F21007C2686 /* file.txt in Resources */, ); runOnlyForDeploymentPostprocessing = 0; diff --git a/IONFilesystemLibTests/IONFILEFileManagerTests.swift b/IONFilesystemLibTests/IONFILEFileManagerTests.swift index 922508d..967e67b 100644 --- a/IONFilesystemLibTests/IONFILEFileManagerTests.swift +++ b/IONFilesystemLibTests/IONFILEFileManagerTests.swift @@ -86,19 +86,6 @@ extension IONFILEFileManagerTests { XCTAssertEqual($0 as? IONFILEChunkPublisherError, .notAbleToReadFile) } } - - func test_readFileInChunks_withInvalidContent_returnsError() { - // Given - createFileManager() - - // When - XCTAssertThrowsError(try fetchChunkedContent( - forFile: (Configuration.fileWithEmojiName, Configuration.fileExtension), withEncoding: .string(encoding: .ascii) - )) { - // Then - XCTAssertEqual($0 as? IONFILEChunkPublisherError, .cantEncodeData) - } - } } // MARK: - 'getFileURL' tests @@ -759,7 +746,6 @@ extension IONFILEFileManagerTests { private extension IONFILEFileManagerTests { struct Configuration { static let fileName = "file" - static let fileWithEmojiName = "file_emojiContent" static let newFileName = "new_file" static let fileExtension = "txt" static let fileContent = "Hello, world!" diff --git a/IONFilesystemLibTests/file_emojiContent.txt b/IONFilesystemLibTests/file_emojiContent.txt deleted file mode 100644 index 600106b..0000000 --- a/IONFilesystemLibTests/file_emojiContent.txt +++ /dev/null @@ -1 +0,0 @@ -🙃 diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 56f42d4..36c8f55 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -18,7 +18,14 @@ default_platform(:ios) platform :ios do desc "Lane to run the unit tests" lane :unit_tests do - run_tests(scheme: "IONFilesystemLib") + run_tests( + scheme: "IONFilesystemLib", + result_bundle: true, + output_directory: "test-results", + output_types: "html,junit", + buildlog_path: "fastlane/test_output", + include_simulator_logs: true + ) end desc "Code coverage"