Open Sebbo94BY opened 1 year ago
We have/had coverage by Coveralls (via Travis CI.) But I'm open to alternatives if there is a popular/more modern choice, Codecov looks pretty great. Do we want to go with that? I'll see about getting things configured.
So I won't be able to add the repo secret here, but I'm able to add it on ronindesign/ts3phpframework
, then we can use that repo and a mirror branch to point the coverage badge at:
[![Code Coverage](https://codecov.io/gh/ronindesign/ts3phpframework/branch/upstream-master/graph/badge.svg)](https://codecov.io/gh/roninsystems/ts3phpframework)
Ah, good point. We can also use Travis CI and/or Coveralls. I don't know, what's better or if there are even any differences besides the name and UI.
The problem is, that you always need to sync your fork with this repo, so that it reflects the actual percentage here, correct?
That's the reason, why I rather would like to implement it directly in the source repo. But I'll leave this up to you.
There seems to exist a Github action to easily upload the PHPUnit coverage result to Coverallls: https://github.com/marketplace/actions/coveralls-github-action (so we could use my above example with coveralls instead of codecov)
Yes, that's correct, it would definitely be a work-around, but maybe we can automate the fork sync using https://github.com/apps/pull ?
Otherwise, I don't see a way of making this happen directly in this repo as Sven hasn't enabled this functionality in the past. So my recommendation would be to not wait for that to happen and to just find an alternative solution instead.
Yeah, we can try this - but at the end, you still have to manually click on merge. So instead of using this app, you could also simply click on "sync" - which avoids the pull request. :D
The app auto-approves the PR, should be 100% automated.
Ah, ok. Yeah, then it would be perfect. :)
@ronindesign do you set up everything and add the badge to the README?
Unfortunately, I've not had time to prioritize this. I will try and make time to add this, but I can't guarantee a timeframe. Appreciate your patience on this.
What about implementing a code coverage badge to the README, so that everyone can see how much code is covered by the tests?
Codecov for example provides a Github action, so we could simply generate the coverage report using a Github workflow and upload it to Coverage: https://github.com/marketplace/actions/codecov
But therefore, somebody with enough permissions to this repository is required:
Example workflow file:
And in the README something like this: