Coverage merging does not work as expected

Description

Hey there, I’ve a repository I need to run tests with multiple composer versions.
Thus, I skip some tests in composer v1 and some tests in composer v2.
At the end, two files should be tested.

I’ve added “flags” to the codecov bash file by appending -cF composer<version> to the upload bash script.

If I have a look into the final results, it still states that only 48% of my code is covered.

Did I missunderstood the merging feature or is there something I have to change?

I introduced codecov in this PR: https://github.com/laminas/laminas-dependency-plugin/pull/18

I would like to know how to get the merged coverage percentage. Should be at least more than 70% I think.

Repository

CI/CD

Travis CI

Uploader

Bash Uploader with -cF to provide flags

Commit SHAs

8e1528a5b74945ecfb3cd7211191bf58e44518d3

Codecov YAML

none

Codecov Output

 bash <(curl -s https://codecov.io/bash) -cF composer${COMPOSER_VERSION}
  _____          _
 / ____|        | |
| |     ___   __| | ___  ___ _____   __
| |    / _ \ / _` |/ _ \/ __/ _ \ \ / /
| |___| (_) | (_| |  __/ (_| (_) \ V /
 \_____\___/ \__,_|\___|\___\___/ \_/
                              Bash-20200602-f809a24
==> Travis CI detected.
    project root: .
    Fixing merge commit SHA
    Yaml not found, that's ok! Learn more at http://docs.codecov.io/docs/codecov-yaml
==> Running gcov in . (disable via -X gcov)
==> Python coveragepy not found
==> Searching for coverage reports in:
    + .
    -> Found 1 reports
==> Detecting git/mercurial file structure
==> Appending build variables
    + TRAVIS_OS_NAME
    + 7.4
==> Reading reports
    + ./clover.xml bytes=25027
==> Appending adjustments
    https://docs.codecov.io/docs/fixing-reports
    + Found adjustments
==> Gzipping contents
==> Uploading reports
    url: https://codecov.io
    query: branch=develop&commit=4c1574a5bdde07079d5947f20a6bb9c6748201af&build=113.12&build_url=&name=&tag=&slug=laminas%2Flaminas-dependency-plugin&service=travis&flags=composer1&pr=18&job=342815503
    -> Pinging Codecov
https://codecov.io/upload/v4?package=bash-20200602-f809a24&token=secret&branch=develop&commit=4c1574a5bdde07079d5947f20a6bb9c6748201af&build=113.12&build_url=&name=&tag=&slug=laminas%2Flaminas-dependency-plugin&service=travis&flags=composer1&pr=18&job=342815503
    -> Uploading
    -> View reports at https://codecov.io/github/laminas/laminas-dependency-plugin/commit/4c1574a5bdde07079d5947f20a6bb9c6748201af
bash <(curl -s https://codecov.io/bash) -cF composer${COMPOSER_VERSION}
  _____          _
 / ____|        | |
| |     ___   __| | ___  ___ _____   __
| |    / _ \ / _` |/ _ \/ __/ _ \ \ / /
| |___| (_) | (_| |  __/ (_| (_) \ V /
 \_____\___/ \__,_|\___|\___\___/ \_/
                              Bash-20200602-f809a24
==> Travis CI detected.
    project root: .
    Fixing merge commit SHA
    Yaml not found, that's ok! Learn more at http://docs.codecov.io/docs/codecov-yaml
==> Running gcov in . (disable via -X gcov)
==> Python coveragepy not found
==> Searching for coverage reports in:
    + .
    -> Found 1 reports
==> Detecting git/mercurial file structure
==> Appending build variables
    + TRAVIS_OS_NAME
    + 7.4
==> Reading reports
    + ./clover.xml bytes=25027
==> Appending adjustments
    https://docs.codecov.io/docs/fixing-reports
    + Found adjustments
==> Gzipping contents
==> Uploading reports
    url: https://codecov.io
    query: branch=develop&commit=4c1574a5bdde07079d5947f20a6bb9c6748201af&build=113.11&build_url=&name=&tag=&slug=laminas%2Flaminas-dependency-plugin&service=travis&flags=composer2&pr=18&job=342815502
    -> Pinging Codecov
https://codecov.io/upload/v4?package=bash-20200602-f809a24&token=secret&branch=develop&commit=4c1574a5bdde07079d5947f20a6bb9c6748201af&build=113.11&build_url=&name=&tag=&slug=laminas%2Flaminas-dependency-plugin&service=travis&flags=composer2&pr=18&job=342815502
    -> Uploading
    -> View reports at https://codecov.io/github/laminas/laminas-dependency-plugin/commit/4c1574a5bdde07079d5947f20a6bb9c6748201af

Additional Information

None.

Hi @boesing, in order to use flags, you need to specify them in a codecov.yml file.

so is there a way how to aggregate two reports from two different CI, one using Github action and other just running with bash? I have tried the -cF and it faile as unrecognised opion
http://35.192.60.23/PyTorchLightning/pytorch-lightning/5279

Hi @Borda, I’m not sure what you are asking here. Coverage reports are automatically merged together, regardless of the CI. What uploader of Codecov are you using (bash, ruby, python, etc) and what version?

it turned out that for some reason one reported uploaded repo with parent folder in its path…