EnricoMi / publish-unit-test-result-action

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

Outline matrix multi OS build usage in README #626

Closed kwin closed 1 month ago

kwin commented 1 month ago

As using EnricoMi/publish-unit-test-result-action/composite@v2 is deprecated I am wondering how to best collect test report in a matrix build covering multiple operating systems. In those cases you usually share the same steps among all builds, however different OSes require now different steps.

kwin commented 1 month ago

Is there some way to derive the step name from the workflow_label (https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#choosing-github-hosted-runners) usually used in the matrix variable and in https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#jobsjob_idruns-on?

EnricoMi commented 1 month ago

You do not need to run the publish action on the same operating system as your tests. Simply move the publish action out of your test job into a subsequent job. The test jobs upload test results as artifacts and a single test result publish job processes all test result files.

kwin commented 1 month ago

Thanks, I now see it being there already: https://github.com/EnricoMi/publish-unit-test-result-action?tab=readme-ov-file#use-with-matrix-strategy. Sorry for the noise then.