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

Merge reports of multiple checks

Open mikepenz opened this issue 4 years ago • 2 comments

Running many checks with different check_name will result in the sidebar to contain all those entries.

It would be great if we could merge together the report so only one entry will be shown

Suggested by @iBotPeaches in this ticket: https://github.com/mikepenz/action-junit-report/issues/194

mikepenz avatar Jun 09 '21 05:06 mikepenz

github recently added job summaries: https://github.blog/2022-05-09-supercharging-github-actions-with-job-summaries/

this reads like it might solve this problem too. (also requires less permissions as bonus)

mbien avatar Jul 02 '22 06:07 mbien

You may want to try the following PR which adds ability configure multiple imports in one step:

      - name: Test Multi test import
        uses: ./
        if: endsWith(github.ref, 'main') == false
        with:
          check_name: |-
            Example Multi JUnit Test Report
            Example Multi Pytest Report
          report_paths: |-
            **/surefire-reports/TEST-*.xml
            test_results/python/report.xml
          summary: |-
            <table><thead><tr><th> Application (src/applications) </th></tr></thead><tbody><tr><td> multi test </td></tr></tbody></table>
            \n
          check_title_template: |-
            {{SUITE_NAME}} | {{TEST_NAME}}
            \n

https://github.com/mikepenz/action-junit-report/pull/606/

mikepenz avatar Jul 22 '22 10:07 mikepenz

This is now included in v3.3.0

mikepenz avatar Aug 20 '22 08:08 mikepenz

Hi @mikepenz! I couldn't make this new feature work for the original use case:

Running many checks with different check_name will result in the sidebar to contain all those entries. It would be great if we could merge together the report so only one entry will be shown

From what I see in your example in https://github.com/mikepenz/action-junit-report/issues/195#issuecomment-1192407403, you produce several sets of reports in the same job and use one action step to handle them all, via multiple check_names and the corresponding report_paths. But this seems to be a very different use case.

My understanding was that now it's possible to run the action on multiple parallel jobs with the same check_name and their results will get merged together. But when I tried that, I actually haven't got any check results.

Could you clarify how the new functionality covers the original use case and what's the intended usage?

laughedelic avatar Sep 19 '22 15:09 laughedelic

@laughedelic with the API you outlined, it's possible to have multiple reports imported at once.

The idea is that this can be used if there are multiple different languages for example or different test report types. It's still possible to have individual runs though if this is preferred

Given the way GitHub handles multiple parallel jobs, the action can't actually combine them this way directly. If you want to import those at once, what you would usually need is something like:

  • archive and upload the result files
  • have a step which is run after your tests / matrix build, ...
  • use the download action from GitHub to collect the reports
  • import all of them via the junit action

mikepenz avatar Sep 26 '22 10:09 mikepenz