mikepenz / action-junit-report

Reports junit test results as GitHub Pull Request Check
https://blog.mikepenz.dev
Apache License 2.0
298 stars 114 forks source link

Annotation: message color #1094

Closed hikouki-gumo closed 2 months ago

hikouki-gumo commented 3 months ago

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
mikepenz commented 3 months ago

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.

hikouki-gumo commented 3 months ago

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.

mikepenz commented 3 months ago

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 commented 2 months ago

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