Skip to content

test: add Actions annotation output

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:

image

If the failing test was not edited, it will still be possible to see the error with the following steps:

image

image

image

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), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines

Merge request reports

Loading