add github PR test coverage integration

Hi there!

I would like to see more modules having github PR integration for unit test coverage.

I use coveralls for the radiology module https://coveralls.io/github/openmrs/openmrs-module-radiology?branch=master it gets the test coverage reports sent from travis CI after every build. On coveralls you can configure that the build should fail if the PR lowers the test coverage by x percent. This makes it clear to every contributor that he’s missing some tests :wink:

Am wondering if there is a plan to do that or what the general opinion about that is?

I would be willing to make a start and add that to the legacyui module.

2 Likes

I personally have no objection to this, especially for the community supported modules. More so that you are even willing to go ahead and do it! :smile:

made a start at https://issues.openmrs.org/browse/LUI-96 see changes https://github.com/openmrs/openmrs-module-legacyui/pull/59

what is left to be done is that the repo needs to be added to coveralls. at the moment the build passes, coverage report is generated and coveralls plugin tries to send them but cannot because the repo is not added to coveralls.io. see https://travis-ci.org/openmrs/openmrs-module-legacyui/builds/157034521#L4336

so someone would need to add the repo to coveralls. I am not authorized. please help :slight_smile:

is there or should there be a github user for such integrations ?

because in the radiology module I was able to add the repo to coveralls with my personal github user. guess because I have more permission on radiology module.

@teleivo you now have admin permissions for the legacyui module. Can you try again? :slight_smile:

thanks, it worked. see updated PR and coveralls :slight_smile:

Yes it works like a charm! Thank you so much! :smile:

Looks good to me

@dkayiwa can you please enable coverage on https://coveralls.io/github/openmrs for the webservice.rest module?

Can you cross check if i have done it correctly? You know this is my first time. :smile:

project is there, so thats good :slight_smile: I think we just need to wait for the next merged PR for it to get reports from travis CI. but it should work!!

hi fans of tested software :floppy_disk:

I would love to see openmrs have test coverage integrated on github PRs. looking at https://ci.openmrs.org/sonar/dashboard/index/1865 coverage could be better and it would definitely become better if its more visible to every contributor and prevent untested code from being merged. hope you agree!

I would create and work on the ticket if you like happy :sunny: day

@teleivo am 100% sure that no one is going disagree! So just go ahead and get jiggy with it! :smile:

there is actually a very old “ready for work” ticket for this

I just claimed it :slight_smile:

Can you please enable openmrs-core on coverals.io thank youuuu :grin:

Done. Thanks for following this up! :slight_smile: