diff --git a/.github/workflows/unittest.yml b/.github/workflows/unittest.yml index 6c8f8a5..69631d9 100644 --- a/.github/workflows/unittest.yml +++ b/.github/workflows/unittest.yml @@ -50,6 +50,11 @@ jobs: -resultBundlePath ${{ env.SCHEME }} -quiet + - uses: actions/upload-artifact@v4 + if: always() + with: + path: '~/xcresult' + - name: Report uses: kishikawakatsumi/xcresulttool@v1 with: diff --git a/Sources/DBXCResultParser/Models/DTO/DTO+Helpers.swift b/Sources/DBXCResultParser/Models/DTO/DTO+Helpers.swift index 2966481..a55d9cd 100644 --- a/Sources/DBXCResultParser/Models/DTO/DTO+Helpers.swift +++ b/Sources/DBXCResultParser/Models/DTO/DTO+Helpers.swift @@ -10,6 +10,7 @@ import Foundation extension ActionsInvocationRecordDTO { init(from xcresultPath: URL) throws { let result = try DBShell.execute("xcrun xcresulttool get --path \(xcresultPath.relativePath) --format json") + try DBShell.execute("echo '\(result)' > ~/xcresult/parsed_ActionsInvocationRecordDTO.json") let data = try result.data(using: .utf8) ?! UnwrapError.valueIsNil self = try JSONDecoder().decode(ActionsInvocationRecordDTO.self, from: data) } @@ -19,6 +20,7 @@ extension ActionTestPlanRunSummariesDTO { init(from xcresultPath: URL, refId: String? = nil) throws { let refId = try (refId ?? ActionsInvocationRecordDTO(from: xcresultPath).testsRefId) let result = try DBShell.execute("xcrun xcresulttool get --path \(xcresultPath.relativePath) --format json --id \(refId)") + try DBShell.execute("echo '\(result)' > ~/xcresult/parsed_ActionTestPlanRunSummariesDTO.json") let data = try result.data(using: .utf8) ?! UnwrapError.valueIsNil self = try JSONDecoder().decode(ActionTestPlanRunSummariesDTO.self, from: data) }