-
Notifications
You must be signed in to change notification settings - Fork 171
Implement error reporter format for GitHub Actions #544
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
Open
Tonkpils
wants to merge
8
commits into
gotestyourself:main
Choose a base branch
from
Tonkpils:tonkpils/github-actions-reporter
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+325
−0
Open
Changes from 2 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
cc0dd1b
Implement error reporter format for GitHub Actions
Tonkpils ac8293a
Reduce line length
Tonkpils a8e39c5
Add strict checks around panic format
Tonkpils 72b3baa
Ignore non test files log for error annotation
Tonkpils dc57f2b
Address multi line error message for annotation
Tonkpils 4f3f77b
Use relative file path to fix annotation comment feature
Tonkpils eef5844
Update github-actions output based on relative file path
Tonkpils a188b31
Update linter errors
Tonkpils File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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'm a bit worried this would be true for anything returning the string
panic:The next loop and if would use the regexp to extract the info
Maybe you could check for "panic:", loop, then test with regexp, and you match once, apply the panic/test results
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.
Do you mean to do this process
For every time we see the
panic:match or only the once?What this does is to gather up all the messages that match
panic:then attributes them to the matching stack trace in the next if/loop block.Happy to make the necessary change. Just want to make sure I'm writing it up for the correct scenario you're thinking about 😅
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'm not sure either what I meant 😬
No matter how it could implemented I just want that gotestsum doesn't report a panic if someone called
I feel like adding a test about it would help you to figure how to catch the issue I thought about
Uh oh!
There was an error while loading. Please reload this page.
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.
That makes sense. I can make the panic check a bit more strict but unfortunately I don't believe there's much we can do to prevent someone from writing an error message that may be similar to a panic initial error message.
I can change the condition to check if the entire output line starts out with
panic:which is more strict than checking for a substring ofpanic:in the entire message.Does that sound reasonable?
Either way, I'll see if I can add some more specific tests to this format so we can have a better picture of the setup/expectation.
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.
Let's wait for the feedback of maintainers here.
I feel like I'm the only one who reviewed your PR right now