EnricoMi / publish-unit-test-result-action

GitHub Action to publish unit test results on GitHub
Apache License 2.0
623 stars 184 forks source link

Emoji not rendered #628

Closed sebastien-savalle closed 4 weeks ago

sebastien-savalle commented 1 month ago

We recently noticed a strange behavior with emoji included in the report. They are no longer rendered, except the duration

One example:

image

Could you have a look ? Thanks a lot, Sebastien

EnricoMi commented 1 month ago

Is that on an enterprise github (non-public)? Do checks not render or job summaries or pull request comments?

sebastien-savalle commented 1 month ago

You're right, we run an enterprise github but it worked before. The issue is present everywhere: in checks, job summaries and pr comments

EnricoMi commented 1 month ago

I presume that is an enterprise github setup issue because the markdown is rendered by Github UI. I presume a config change has happened.

sebastien-savalle commented 1 month ago

Yes probably and this is really strange because the duration πŸ• emoticon is still rendered. But this is the only one. For others, like βœ… , they are properly working everywhere except when the markdown is generated by your action.

Example with another action (dorny/test-reporter) in the same repository: image

EnricoMi commented 1 month ago

I presume βœ… is a unicode character in that markdown and not a :white_check_mark: (:white_check_mark:)?

Please try the following: copy the following lines into a message in your enterprise github:

βœ… is a unicode character
:white_check_mark: needs to be rendered
EnricoMi commented 1 month ago

Looks like the dorny report uses the unicode character: https://github.com/dorny/test-reporter/blob/1a288b62f8b75c0f433cbfdbc2e4800fbae50bd7/src/utils/markdown-utils.ts#L8-L12

EnricoMi commented 1 month ago

I could not find any announcement by Github that those named emoji might be deprecated, only this bug report that got resolved: https://github.com/orgs/community/discussions/77606

EnricoMi commented 1 month ago

Anyway, might be safer to use unicode emojis rather than named emojis.

EnricoMi commented 1 month ago

Interesting is that the named stopwatch emoji :stopwatch: is working for you...

sebastien-savalle commented 1 month ago

I presume βœ… is a unicode character in that markdown and not a βœ… (:white_check_mark:)?

Please try the following: copy the following lines into a message in your enterprise github:

βœ… is a unicode character
:white_check_mark: needs to be rendered

image

And we use it (:white_check_mark:) regularly in pull request without issues

sebastien-savalle commented 1 month ago

You're right, the other action seems to use unicode icons.

https://github.com/dorny/test-reporter/blob/1a288b62f8b75c0f433cbfdbc2e4800fbae50bd7/src/utils/markdown-utils.ts#L9

EnricoMi commented 1 month ago

Can you edit a pull request comment of this action and copy-paste the markdown here?

sebastien-savalle commented 1 month ago

Sure

publish-unit-test-result-action:

## Backend Tests Result
β€‡β€ˆβ€‡15 filesβ€„β€ƒβ€‡β€ˆ864 suites   31m 13s :stopwatch:
3β€ˆ734 tests 3β€ˆ730 :white_check_mark: 4 :zzz: 0 :x:
3β€ˆ768 runsβ€Šβ€ƒ3β€ˆ764 :white_check_mark: 4 :zzz: 0 :x:

Results for commit 5a770bff.

[test-results]:data:application/gzip;base64,H4sIANOBB2cC/02PQQ6DIBBFr2JYdzEgMtrLNIiQkKo0CCvTu3dEG1y+9ycvsDPnZ7uxZ8O7R8O27FOhXknCKUedfFiPuceWDK3p2Fts5R9fWzbmdFDd23/I1SOn/UyiXtgYQ7xMzOtZVf1FNVpecqraLHxLFr4XTVgWnwhYpxFhdA4QpBhRm0kAiEEqBZo+Zbg1E8eBs+8PC0H2RA0BAAA=

:recycle: This comment has been updated with latest results.

Rendered as:

image
EnricoMi commented 4 weeks ago

Can you edit the pull request comment once more and add

βœ… is a unicode character
:white_check_mark: needs to be rendered

from above to it and see if that renders as before?

EnricoMi commented 4 weeks ago

Can you try running the action from this branch to test a fix?

uses: EnricoMi/publish-unit-test-result-action/composite@unicode-emojis

That branch uses unicode emojis rather than markdown.

sebastien-savalle commented 4 weeks ago

This is clearly better :)

I used uses: EnricoMi/publish-unit-test-result-action@unicode-emojis not uses: EnricoMi/publish-unit-test-result-action/composite@unicode-emojis

image
EnricoMi commented 4 weeks ago

With uses: EnricoMi/publish-unit-test-result-action@unicode-emojis you effectively run the release version, not the changes of the unicode-emojis branch. If you edit the comment, you should see it contains markdown emojis. Interesting that this works again.

sebastien-savalle commented 4 weeks ago

I can confirm this is markdown, sometimes it works, sometimes not. Really weird.

EnricoMi commented 4 weeks ago

That is why I would like you to test this branch to see if this works around this bug. In the end Github has to fix it but I'd prefer the unicode emojis if they make things more robust.

sebastien-savalle commented 4 weeks ago

Yes I understood but I can't use the composite action which is not approved by my github enterprise.

EnricoMi commented 4 weeks ago

Alright, I think this is safe to be released.

EnricoMi commented 4 weeks ago

Fix has been released.