action-junit-report icon indicating copy to clipboard operation
action-junit-report copied to clipboard

Annotation: message color

Open hikouki-gumo opened this issue 1 year ago • 3 comments

When a test failed, only annotation title is colored. Message is not and is represented as ANSI code. Is it a bug?

ServiceInteg - Policies should be empty // title, this line is colored correctly
[31m- Policies should be empty[0m
    [31m Result was false[0m
    [1maccountPolicy[0m[1m[33m != Seq.empty[0m[0m[1m[0m
    [2maccountPolicy = [0mNil

hikouki-gumo avatar May 17 '24 03:05 hikouki-gumo

Good day.

The visualisation is controlled by GitHub so that appears correct.

Related the content of the message. The action itself parses your junit report and shouldn't change the contents. Please have a look at your report and see if it already contains the details as shown above.

mikepenz avatar May 17 '24 06:05 mikepenz

Hi mikepenz, the content is correct, it contains ANSI code for colorize. Github actions log already supports color (other steps in my CI are colored correctly), so I suppose the log should be colored but it's not.

🚀 Publish results
  ℹ️ - ci/test - 136 tests run, 135 passed, 0 skipped, 1 failed.
🧪 - Integ.scala | [31m- Policies should be empty[0m

Btw if you know any workaround, please let me know.

hikouki-gumo avatar May 17 '24 08:05 hikouki-gumo

That's beyond my knowledge. I doubt that GitHub supports ansi codes for colorisation for markdown text it displays in annotations. At least I've never read anything referencing that.

Here is the code which annotates: https://github.com/mikepenz/action-junit-report/blob/main/src/annotator.ts#L47-L52

mikepenz avatar May 17 '24 09:05 mikepenz

Closing as this appears to be out of scope of the possible. If you have github documentation which describes how to achieve this

mikepenz avatar Jun 21 '24 07:06 mikepenz