mikepenz/action-junit-report

check title name {{ FILE_NAME }} is not working

hlolli opened this issue ยท 3 comments

Thanks a lot for this plugin, we the csound developers have been using it for almost two years now ๐Ÿ™

We are now extending our tests and are experiencing an issue.
the file name macro appears empty here https://github.com/csound/csound/actions/runs/3169515183
but I did include it here as it was listed in the manual https://github.com/csound/csound/blob/ead287fdedb7334c3e16c1b2bd9e028b9792295e/.github/workflows/csound_wasm.yml#L113-L114
perhaps you can see if I've configured it incorrectly, but the files are picked up from the filepath glob, and I'd assume the filenames are known?

Thanks again!

In a quick look over the provided code I don't see anything suspicious.

The code responsible for replacing the pattern is found here:

// ensure to not duplicate the test_name if file_name is equal
const fileName = pos.fileName !== testcase._attributes.name ? pos.fileName : ''
title = checkTitleTemplate
.replace(templateVar('FILE_NAME'), fileName)
.replace(templateVar('SUITE_NAME'), suiteName ?? '')
.replace(templateVar('TEST_NAME'), testcase._attributes.name)

Could you possibly provide a simplified junit export so I can reproduce in the test-cases. Thank you.

@hlolli I'd appreciate if you could please provide additional input on the ticket.

Closing this ticket due to inactivity, please report back to reopen.