test: add Actions annotation output#34590
Closed
Uh oh!
There was an error while loading. Please reload this page.
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.
It's possible to annotate failures in Actions by printing
::error file={},line={},col={}::{message}. This methos is preferrable over using a problem matcher because problem matchers only allow single-line messages, whereas ::error allows multi-line messages.When the test being annotated is edited in a Pull Request, GitHub will show it inline where the error happened:
If the failing test was not edited, it will still be possible to see the error with the following steps:
The link on the annotation in this case will point to the last commit in the PR instead of pointing to the file (which is a bit unfortunate, but that's a GitHub Actions Runner limitation apparently). The filename on the annotation is still correct though, so this is still an improvement over the current situation where we need to look at the logs (which can be confusing for newcomers).
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes