-
-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Azure] Add A Renderer For Azure DevOps Pipeline #338
Conversation
func formatSwiftTestingIssue(group: SwiftTestingIssueCaptureGroup) -> String { | ||
let message = "Recorded an issue" + (group.issueDetails.map { " (\($0))" } ?? "") | ||
return outputGitHubActionsLog( | ||
annotationType: .notice, | ||
return makeOutputLog( | ||
annotation: .error, | ||
message: message | ||
) | ||
} | ||
|
||
func formatSwiftTestingIssueArguments(group: SwiftTestingIssueArgumentCaptureGroup) -> String { | ||
let message = "Recorded an issue" + (group.numberOfArguments.map { " (\($0)) argument(s)" } ?? "") | ||
return outputGitHubActionsLog( | ||
annotationType: .notice, | ||
return makeOutputLog( | ||
annotation: .error, | ||
message: message | ||
) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed the annotation for these two methods to .error
as it reflects what's shown in the Xcode.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! If it's not too much trouble, can you split this out into its own PR? Happy to do that if you'd like – just let me know if you'd like me to.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, I will raise a separate PR soon.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will revert the test back to |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #338 +/- ##
==========================================
+ Coverage 88.86% 89.48% +0.62%
==========================================
Files 14 17 +3
Lines 2291 2312 +21
==========================================
+ Hits 2036 2069 +33
+ Misses 255 243 -12 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @weisunOW! Thanks so much for your patience and contribution! This looks great to me, and I'm glad folks will be able to use this on Azure CI soon.
Quick question: Have you tested these changes in Azure's CI to see that it renders as you expect? If not, can you do that (and possibly link for me to check out)?
Thanks again... Looks good to approve once we address my one comment and question.
func formatSwiftTestingIssue(group: SwiftTestingIssueCaptureGroup) -> String { | ||
let message = "Recorded an issue" + (group.issueDetails.map { " (\($0))" } ?? "") | ||
return outputGitHubActionsLog( | ||
annotationType: .notice, | ||
return makeOutputLog( | ||
annotation: .error, | ||
message: message | ||
) | ||
} | ||
|
||
func formatSwiftTestingIssueArguments(group: SwiftTestingIssueArgumentCaptureGroup) -> String { | ||
let message = "Recorded an issue" + (group.numberOfArguments.map { " (\($0)) argument(s)" } ?? "") | ||
return outputGitHubActionsLog( | ||
annotationType: .notice, | ||
return makeOutputLog( | ||
annotation: .error, | ||
message: message | ||
) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! If it's not too much trouble, can you split this out into its own PR? Happy to do that if you'd like – just let me know if you'd like me to.
Hi @cpisciotta, happy to help.
I've verified the branch on one of the pipelines of my enterprise project. The update renders fine on Azure Pipelines for the included logs under Microsoft temporarily disabled free grants for new organisations on Azure DevOps until the end of this year, so I can't provide a public pipeline for you to check. Unfortunately, I also can't share the logs from the enterprise pipeline due to policy. |
## Description This PR updates the annotation type for Swift Testing issue recording (`.notice` -> `.error`), aligning with both Xcode and `swift test` output. ## References See discussion in #338 (comment) Co-authored-by: Wei Sun <[email protected]>
8495f9d
to
659a8d4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks again for contributing this change 🚀
@weisunOW It's late my time, so I will follow up on releasing a new version – likely tomorrow night. |
Thanks @cpisciotta, looking forward to the new release. |
Description
This PR adds a renderer to annotate build logs for Azure DevOps pipelines. The new
AzureDevOpsPipelinesRenderer
shares most formatting logic withGitHubActionsRenderer
.E.g.
Or
References
Azure DevOps - Task Commands