In my pull request CI pipeline, I run PHPUnit and i let it generate a code coverage report.
Documentation is severely lacking, but based on https://community.atlassian.com/forums/Bitbucket-questions/How-to-enable-code-coverage-in-bitbucket-piplines-for-my-Laravel/qaq-p/859406 I made this:
pipelines:
pull-requests:
'**':
- step:
name: Unit tests
script:
- XDEBUG_MODE=coverage ./vendor/bin/phpunit --coverage-clover test-reports/coverage.xml
artifacts:
- test-reports/**
The coverage.xml is included in the artifacts. but nothing is shown on the pull request page in BitBucket.
How do I get the code coverage visible in the pull request?
I am looking for the BitBucket equivalent of this: https://docs.gitlab.com/ci/testing/code_coverage/
Ideally, I would like to see how a PR affects code coverage (higher or lower) so that we can act on that.
I don't think you can view any kind of coverage report on the pull request screen.
As in the old topic suggested, you should instead:
I think currently this is the only way to approach it.
Hi Aron, thanks for taking the time to reply!
This is seriously disappionting, but knowing this i at least won't waste more time on trying to get this to work.
Thanks!
And Atlassian folks, if you're reading this: any chance you are working on this?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.