Skip to content
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

Experiment: Reporting test failures as annotations #10821

Draft
wants to merge 12 commits into
base: develop
Choose a base branch
from

Conversation

radeusgd
Copy link
Member

Pull Request Description

Important Notes

Checklist

Please ensure that the following checklist has been satisfied before submitting the PR:

  • The documentation has been updated, if necessary.
  • Screenshots/screencasts have been attached, if there are any visual changes. For interactive or animated visual changes, a screencast is preferred.
  • All code follows the
    Scala,
    Java,
    TypeScript,
    and
    Rust
    style guides. In case you are using a language not listed above, follow the Rust style guide.
  • Unit tests have been written where possible.

@radeusgd radeusgd added the CI: No changelog needed Do not require a changelog entry for this PR. label Aug 14, 2024
@radeusgd
Copy link
Member Author

image

This is what the annotations look like on a PR. I think this could be a helpful improvement when looking for test failures - instead of having to dig into the workflows, we can display them right there.

They also appear in the workflow summary:
image

@@ -223,7 +223,9 @@ impl BuiltEnso {
if errors.is_empty() {
Ok(())
} else {
error!("{} test suit(s) failed.", errors.len());
let summary = errors.as_slice().iter().map(|e| e.to_string()).collect::<Vec<_>>().join(", ");
println!("::error title=Failed Standard Library Tests::{} test suite(s) failed: {}", errors.len(), summary);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see a line starting with :: - that must be a GitHub Actions command line! Where is the syntax documented?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am glad we ended up doing the same - e.g. using println! to print the command line without a prefix. Just like at my PR.

@radeusgd
Copy link
Member Author

radeusgd commented Sep 3, 2024

I did not manage to cleanup and finish this yet because I was focusing on more pressing tasks. I will re-visit this once I'm back from vacation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI: No changelog needed Do not require a changelog entry for this PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants