Codecov-action v2 not working (v1 does work)


We are using the github codecov action (GitHub - codecov/codecov-action: GitHub Action that uploads coverage to Codecov) but found that v2 isn’t working for us anymore

Commit SHAs

‘codecov/codecov-action@v2.1.0’ (SHA:f32b3a3741e1053eb607407145bc9619351dc93b)


See GitHub - RemedyIT/taox11: TAOX11, the CORBA implementation for C++11 and Bump codecov/codecov-action from 1 to 2.1.0 by dependabot[bot] · Pull Request #172 · RemedyIT/taox11 · GitHub

CI/CD or Build URL


SHA f32b3a3741e1053eb607407145bc9619351dc93b

Codecov Output

2021-09-13T14:01:30.8154888Z ##[group]Run codecov/codecov-action@v2.1.0
2021-09-13T14:01:30.8155347Z with:
2021-09-13T14:01:30.8155674Z   verbose: true
2021-09-13T14:01:30.8156009Z env:
2021-09-13T14:01:30.8156433Z   DOC_ROOT: /home/runner/work/taox11/taox11/ACE_TAO
2021-09-13T14:01:30.8156968Z   ACE_ROOT: /home/runner/work/taox11/taox11/ACE_TAO/ACE
2021-09-13T14:01:30.8157535Z   MPC_ROOT: /home/runner/work/taox11/taox11/ACE_TAO/MPC
2021-09-13T14:01:30.8158083Z   TAO_ROOT: /home/runner/work/taox11/taox11/ACE_TAO/TAO
2021-09-13T14:01:30.8158755Z   X11_BASE_ROOT: /home/runner/work/taox11/taox11/axcioma
2021-09-13T14:01:30.8159307Z   RIDL_ROOT: /home/runner/work/taox11/taox11/ridl
2021-09-13T14:01:30.8159818Z   TAOX11_ROOT: /home/runner/work/taox11/taox11
2021-09-13T14:01:30.8160237Z   CC: gcc-9
2021-09-13T14:01:30.8160537Z   CXX: g++-9
2021-09-13T14:01:30.8160868Z ##[endgroup]
2021-09-13T14:01:30.9311002Z ==> linux OS detected
2021-09-13T14:01:32.0459642Z ==> SHASUM file signed by key id 806bb28aed779869
2021-09-13T14:01:32.0461139Z ==> Uploader SHASUM verified (f4daf62bfc474b5aeebb25b3cf1a467b01f930b404ba7e618abc6141b72a04a9  codecov)
2021-09-13T14:01:32.0462713Z ==> Running version latest
2021-09-13T14:01:32.0463349Z ==> Running version v0.1.0_8880
2021-09-13T14:01:32.0465292Z [command]/home/runner/work/_actions/codecov/codecov-action/v2.1.0/dist/codecov -n  -Q github-action-2.1.0 -C a1949a2487fa7d1ee64e273d822aa049944f0527 -v
2021-09-13T14:01:32.1943532Z [2021-09-13T14:01:32.192Z] ['info'] 
2021-09-13T14:01:32.1945376Z      _____          _
2021-09-13T14:01:32.1945809Z     / ____|        | |
2021-09-13T14:01:32.1946225Z    | |     ___   __| | ___  ___ _____   __
2021-09-13T14:01:32.1946647Z    | |    / _ \ / _` |/ _ \/ __/ _ \ \ / /
2021-09-13T14:01:32.1947074Z    | |___| (_) | (_| |  __/ (_| (_) \ V /
2021-09-13T14:01:32.1947485Z     \_____\___/ \__,_|\___|\___\___/ \_/
2021-09-13T14:01:32.1948217Z   Codecov report uploader 0.1.0
2021-09-13T14:01:32.2001872Z [2021-09-13T14:01:32.199Z] ['info'] => Project root located at: /home/runner/work/taox11/taox11
2021-09-13T14:01:32.2010113Z [2021-09-13T14:01:32.200Z] ['info'] -> No token specified or token is empty
2021-09-13T14:01:32.2011321Z [2021-09-13T14:01:32.200Z] ['verbose'] Start of network processing...
2021-09-13T14:01:32.2012637Z [2021-09-13T14:01:32.201Z] ['verbose'] Searching for files in /home/runner/work/taox11/taox11
2021-09-13T14:01:32.5061576Z [2021-09-13T14:01:32.505Z] ['info'] Searching for coverage files...
2021-09-13T14:01:32.7872411Z [2021-09-13T14:01:32.786Z] ['info'] => Found 8 possible coverage files:
2021-09-13T14:01:32.7873280Z   bin/taox11_tests.lst
2021-09-13T14:01:32.7873807Z   ACE_TAO/ACE/bin/ace_tests.lst
2021-09-13T14:01:32.7874350Z   ACE_TAO/ACE/bin/msvc_static_order.lst
2021-09-13T14:01:32.7874905Z   ACE_TAO/ACE/tests/run_test.lst
2021-09-13T14:01:32.7875437Z   ACE_TAO/TAO/bin/tao_orb_tests.lst
2021-09-13T14:01:32.7875999Z   ACE_TAO/TAO/bin/tao_other_tests.lst
2021-09-13T14:01:32.7876593Z   ACE_TAO/TAO/tests/Bug_3755_Ext_Regression/all.lst
2021-09-13T14:01:32.7877201Z   ACE_TAO/TAO/tests/COIOP/COIOP.lst
2021-09-13T14:01:32.7878077Z [2021-09-13T14:01:32.786Z] ['verbose'] End of network processing
2021-09-13T14:01:32.7879082Z [2021-09-13T14:01:32.786Z] ['info'] Processing /home/runner/work/taox11/taox11/bin/taox11_tests.lst...
2021-09-13T14:01:32.7888480Z [2021-09-13T14:01:32.788Z] ['info'] Processing /home/runner/work/taox11/taox11/ACE_TAO/ACE/bin/ace_tests.lst...
2021-09-13T14:01:32.7897194Z [2021-09-13T14:01:32.789Z] ['info'] Processing /home/runner/work/taox11/taox11/ACE_TAO/ACE/bin/msvc_static_order.lst...
2021-09-13T14:01:32.7903731Z [2021-09-13T14:01:32.790Z] ['info'] Processing /home/runner/work/taox11/taox11/ACE_TAO/ACE/tests/run_test.lst...
2021-09-13T14:01:32.7910762Z [2021-09-13T14:01:32.790Z] ['info'] Processing /home/runner/work/taox11/taox11/ACE_TAO/TAO/bin/tao_orb_tests.lst...
2021-09-13T14:01:32.7919966Z [2021-09-13T14:01:32.791Z] ['info'] Processing /home/runner/work/taox11/taox11/ACE_TAO/TAO/bin/tao_other_tests.lst...
2021-09-13T14:01:32.7927424Z [2021-09-13T14:01:32.792Z] ['info'] Processing /home/runner/work/taox11/taox11/ACE_TAO/TAO/tests/Bug_3755_Ext_Regression/all.lst...
2021-09-13T14:01:32.7935157Z [2021-09-13T14:01:32.793Z] ['info'] Processing /home/runner/work/taox11/taox11/ACE_TAO/TAO/tests/COIOP/COIOP.lst...
2021-09-13T14:01:32.8240746Z [2021-09-13T14:01:32.823Z] ['info'] Detected GitHub Actions as the CI provider.
2021-09-13T14:01:32.8242038Z [2021-09-13T14:01:32.823Z] ['verbose'] -> Using the following env variables:
2021-09-13T14:01:32.8242891Z [2021-09-13T14:01:32.823Z] ['verbose']      GITHUB_ACTION: __codecov_codecov-action
2021-09-13T14:01:32.8244085Z [2021-09-13T14:01:32.823Z] ['verbose']      GITHUB_HEAD_REF: dependabot/github_actions/codecov/codecov-action-2.1.0
2021-09-13T14:01:32.8245042Z [2021-09-13T14:01:32.823Z] ['verbose']      GITHUB_REF: refs/pull/172/merge
2021-09-13T14:01:32.8245848Z [2021-09-13T14:01:32.823Z] ['verbose']      GITHUB_REPOSITORY: RemedyIT/taox11
2021-09-13T14:01:32.8246578Z [2021-09-13T14:01:32.823Z] ['verbose']      GITHUB_RUN_ID: 1229679647
2021-09-13T14:01:32.8247370Z [2021-09-13T14:01:32.823Z] ['verbose']      GITHUB_SERVER_URL:
2021-09-13T14:01:32.8248385Z [2021-09-13T14:01:32.823Z] ['verbose']      GITHUB_SHA: d9cb65175dd542b6ea5ecc1b6ee5418df5d73890
2021-09-13T14:01:32.8249305Z [2021-09-13T14:01:32.823Z] ['verbose']      GITHUB_WORKFLOW: linux
2021-09-13T14:01:32.8251969Z [2021-09-13T14:01:32.824Z] ['info'] Pinging Codecov:*******&branch=dependabot/github_actions/codecov/codecov-action-2.1.0&build=1229679647&
2021-09-13T14:01:32.8254245Z [2021-09-13T14:01:32.824Z] ['verbose'] Passed token was 0 characters long
2021-09-13T14:01:32.8256750Z [2021-09-13T14:01:32.824Z] ['verbose']
2021-09-13T14:01:32.8258819Z         Content-Type: 'text/plain'
2021-09-13T14:01:32.8259543Z         Content-Encoding: 'gzip'
2021-09-13T14:01:32.8260309Z         X-Reduced-Redundancy: 'false'
2021-09-13T14:01:33.2784673Z [2021-09-13T14:01:33.277Z] ['verbose'] Returned upload url:
2021-09-13T14:01:33.2796953Z [2021-09-13T14:01:33.277Z] ['verbose']
2021-09-13T14:01:33.2800739Z         Content-Type: 'text/plain'
2021-09-13T14:01:33.2801449Z         Content-Encoding: 'gzip'
2021-09-13T14:01:33.2802428Z [2021-09-13T14:01:33.277Z] ['info'] Uploading...
2021-09-13T14:01:33.5080948Z [2021-09-13T14:01:33.507Z] ['info'] {"status":"success","resultURL":""}

Expected Results

Some coverage data

Actual Results

No coverage data is uploaded

Additional Information

Any additional information, configuration or data that might be necessary to reproduce the issue.

@jwillemsen it looks like the coverage reports that are sent aren’t the same. Do you have a link or the output to one of the v1 uploads working for you?

See for a run with v1 ( ubuntu-20.04 g+±9 ruby-2.7) job

Ah, I think I see the problem @jwillemsen. The v1 version relied on the bash uploader which runs gcov by default. We removed this feature as it was causing CI delays for users who didn’t need it.

You should be able to add a step before the Codecov action that runs gcov .. Let me know if that works for you.

Ok, thanks for the hint, updated the PR, see Bump codecov/codecov-action from 1 to 2.1.0 by dependabot[bot] · Pull Request #172 · RemedyIT/taox11 · GitHub, CI is running

Is there any public example how to use the new codecov-action v2 for a C++ program?

Got a little bit further, now running gcov myself, command taken from the v1 log

    - name: Run gcov
      run: |
        find . -type f -name '*.gcno' -exec gcov -pb  {} +
      if: matrix.feature == 'Codecov'
    - uses: codecov/codecov-action@v2
        verbose: true # optional (default = false)
      if: matrix.feature == 'Codecov'

But at you can see from Bump codecov/codecov-action from 1 to 2 and add gcov invocation by dependabot · Pull Request #172 · RemedyIT/taox11 · GitHub the coverage decreased with almost 35%, anything else I should do, any path mapping that v1 did do automatically which I need to do manual now?

@jwillemsen it seems like most of the changes are due to covered lines showing as partially covered now. I’m guessing this might have something to do with tracking branch coverage that maybe wasn’t getting tracked beforehand? Would this make sense to you?

Not reallly, when looking at tests/hello/client.cpp it tells if (_orb == nullptr) will be removed from coverage but that if is really executed. Is there some pre/post processing that is not done by v2 which is done by v1?

@jwillemsen actually what it looks like it’s showing is that that line is partially covered, that this is due to branch coverage. What it likely means is that the line is executed (line coverage), but that only the true condition is executed. There isn’t a case where _orb != nullptr.

As for processing, there isn’t anything different between v2 and v1, except that gcov isn’t being automatically run.

To be honest, I think having partial coverage shown in this way is more accurate, but I can understand the pain in having that drop in coverage. I think you can turn off branch coverage in the yaml by doing something like this.

      conditional: false

Thanks for the feedback, your explanation makes sense, only strange that we see this when switching from v1 to v2, with v1 it didn’t show the partial coverage.

@jwillemsen my guess is this has to do with the gcov command that is run. I would believe that the way you are calling it is also collecting branch coverage now.