Skip to content

Commit

Permalink
Added debug logs
Browse files Browse the repository at this point in the history
  • Loading branch information
AllDmeat committed Feb 27, 2024
1 parent cd8875b commit 324a92b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/unittest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 2 additions & 0 deletions Sources/DBXCResultParser/Models/DTO/DTO+Helpers.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand All @@ -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)
}
Expand Down

0 comments on commit 324a92b

Please sign in to comment.