junction icon indicating copy to clipboard operation
junction copied to clipboard

add(#751): add support for github actions

Open indiVar0508 opened this issue 2 years ago • 6 comments

indiVar0508 avatar Jun 15 '23 17:06 indiVar0508

@indiVar0508 This looks good. I have few more task additions.

  • We need to display test results on GitHub CI. Once #777 is merged it will dump testresults o temp/ directory. Please check this test-reporter GitHub plugin documentation for the same.
  • We need a coverage report summary as well. For this you can explore code-coverage-summary plugin

Also feel free to explore any other tools you seem fit for this and we can discuss here further.

ananyo2012 avatar Jun 20 '23 11:06 ananyo2012

Hi @ananyo2012 ,

Added coverage step and to report it in PR comment which will be update for each run.

I tried adding testing-report but it seems to be failing ig due to the format which is not acceptable by the test-reporter action, getting error in reading file with jest-junit. ref: https://github.com/indiVar0508/junction/actions/runs/5365317262/jobs/9734065641 . A workaround ig is to use java-junit but requires to unittest-xml-reporting to generate report which still has some limitations ref: https://github.com/dorny/test-reporter/issues/244

indiVar0508 avatar Jun 25 '23 16:06 indiVar0508

@indiVar0508 Please check https://github.com/marketplace/actions/publish-test-results as an alternative for test-reporting

ananyo2012 avatar Jun 27 '23 10:06 ananyo2012

Thanks @ananyo2012 , I have added same in this PR you can check once ig some permissions from project is required as i saw last time it failed write comment however it was able to write comment in my forked project. Do let know if anything else is needed to be added or some other issue that i can take up

indiVar0508 avatar Jul 02 '23 12:07 indiVar0508

@indiVar0508 You need to create a separate workflow for Publishing Results - https://github.com/EnricoMi/publish-unit-test-result-action/blob/v2.8.0/README.md#support-fork-repositories-and-dependabot-branches . Let's Name the first Workflow as 'CI' and second one as 'Test Report'.

Also the Pull request comments should only run during Pull request events, not for master branch.

ananyo2012 avatar Jul 04 '23 14:07 ananyo2012

Added as per comments @ananyo2012

  • renamed the respective workflows
  • encorporated steps metioned in the links
  • comment for coverage reports will posted for pull request event and publish test result seems to already handle this

indiVar0508 avatar Jul 04 '23 19:07 indiVar0508