For our repos, we only push directly to hotfix or develop branch, never to the master branch. We merge from develop/hotfix into master branch only.
Problem is Codecov merges all reports for a specific branch, not taking the branch into perpsective. This means our "master" branch will always be empty on Codecov, unless we push directly to it.
For example :
- Commit to develop
- Travis run test on the develop branch, send report to Codecov
- Codecov adds the report as
developbranch - Git Merge
developinto master - Travis run test on the master branch, send report to Codecov
Codecov merge the report from master into develop report
Result : No reports available for master branch, badge still shows "Unknown" for master branch.
See an example repo :
- GH : https://github.com/userfrosting/cache
- Travis :https://travis-ci.org/userfrosting/cache/builds
- CodeCov : https://codecov.io/gh/userfrosting/cache/commit/93a3d5d440c058bcb65efea0aa95e8bb79241cb8/build
For example, the Update README.md merge commit ( 93a3d5d ) on the master branch didn’t trigger a report on the master branch on Codecov. You can see the Travis build for both branch that successfully send in the reports.
How can we make sure the reports are synched with master without :
- pushing a unique commit to master first
- make the develop branch the default one on codecov
- use the default branch badge in our Reame