Bitbucket codecov integration

39 Views Asked by At

I have a bitbucket private monorepo.

At the moment i have two Laravel services (will be more in the next months) and i want to integrate with codecov for code coverage.

In the pipelines i've added a simple script to generate the coverage and upload it with a flag:

XDEBUG_MODE=coverage ./vendor/bin/phpunit --coverage-clover coverage/coverage.xml
curl -Os https://uploader.codecov.io/latest/linux/codecov
chmod +x codecov
./codecov -F api -f coverage/coverage.xml

This will be repeated for flag "backend".

The coverage report is uploaded and i can see the branches, percentages, etc.

What am i missing is:

  • pr comments
  • source code visible on codecov

for PR comments, i setted up a codecov.yml in my root directory:

codecov:
  bot: {{ MY_USERNAME }}

comment:                  # this is a top-level key
  layout: " diff, flags, files"
  behavior: default
  require_changes: false  # if true: only post the comment if coverage changes
  require_base: false        # [true :: must have a base report to post]
  require_head: true       # [true :: must have a head report to post]
  hide_project_coverage: false # [true :: only show coverage on the git diff]


coverage:
  status:
    project: off
    patch: off

flag_management:
  individual_flags:
    - name: api
      paths:
        - api/
      statuses:
        - type: project
          target: 100%
          threshold: 5%
    - name: backend
      paths:
        - backend/
      statuses:
        - type: project
          target: auto
          threshold: 5%

but seems to not be executed due in my PR i have no comments.

for the source code, I've followed some tutorials and read the community (now closed) but i can't figure out what is it.

1

There are 1 best solutions below

0
Jerrod On

Codecov's community board was closed in favor of Github Issues when we made our codebase source available.

Can you please open this as an issue here?

https://github.com/codecov/feedback/issues