Codecov-action v2 not working (v1 does work)

Description

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)

Repository

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

https://pipelines.actions.githubusercontent.com/Fq4aLn43zJMUd2UMPmTH60dIO8edT3ru6RUxiAM1dfiR3xOZXI/_apis/pipelines/1/runs/1293/signedlogcontent/7?urlExpires=2021-09-13T14%3A35%3A22.1867277Z&urlSigningMethod=HMACV1&urlSignature=t%2FM4C6zgnF%2B%2FZvPr2lUl6uVUPfuV0FbswfxgRsMaFiM%3D

Uploader

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.0451197Z https://uploader.codecov.io/latest/linux/codecov.SHA256SUM
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.1947793Z 
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: https://github.com
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: https://codecov.io/upload/v4?package=github-action-2.1.0-uploader-0.1.0&token=*******&branch=dependabot/github_actions/codecov/codecov-action-2.1.0&build=1229679647&build_url=https%3A%2F%2Fgithub.com%2FRemedyIT%2Ftaox11%2Factions%2Fruns%2F1229679647&commit=a1949a2487fa7d1ee64e273d822aa049944f0527&job=linux&pr=172&service=github-actions&slug=RemedyIT/taox11&name=&tag=&flags=&parent=
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'] https://codecov.io/upload/v4?package=github-action-2.1.0-uploader-0.1.0&branch=dependabot/github_actions/codecov/codecov-action-2.1.0&build=1229679647&build_url=https%3A%2F%2Fgithub.com%2FRemedyIT%2Ftaox11%2Factions%2Fruns%2F1229679647&commit=a1949a2487fa7d1ee64e273d822aa049944f0527&job=linux&pr=172&service=github-actions&slug=RemedyIT/taox11&name=&tag=&flags=&parent=
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: https://codecov.io/github/RemedyIT/taox11/commit/a1949a2487fa7d1ee64e273d822aa049944f0527
2021-09-13T14:01:33.2789596Z https://storage.googleapis.com/codecov/v4/raw/2021-09-13/CFFCDE401EEF2CE12337C961D3642BA7/a1949a2487fa7d1ee64e273d822aa049944f0527/a8f93745-55c7-4ae7-8a08-67f166929ccd.txt?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=GOOG1EKKHVKCKHW7KBCGM7IHR55T63V2PAVJWLVFNITJHDU5G6R5IRN3LMWJA%2F20210913%2FUS%2Fs3%2Faws4_request&X-Amz-Date=20210913T140133Z&X-Amz-Expires=10&X-Amz-SignedHeaders=host&X-Amz-Signature=abe71950066249a7a329b461e9a7ec451ed0c4a7a9ed63a88f015a837bdf39e6
2021-09-13T14:01:33.2796953Z [2021-09-13T14:01:33.277Z] ['verbose'] https://storage.googleapis.com/codecov/v4/raw/2021-09-13/CFFCDE401EEF2CE12337C961D3642BA7/a1949a2487fa7d1ee64e273d822aa049944f0527/a8f93745-55c7-4ae7-8a08-67f166929ccd.txt?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=GOOG1EKKHVKCKHW7KBCGM7IHR55T63V2PAVJWLVFNITJHDU5G6R5IRN3LMWJA%2F20210913%2FUS%2Fs3%2Faws4_request&X-Amz-Date=20210913T140133Z&X-Amz-Expires=10&X-Amz-SignedHeaders=host&X-Amz-Signature=abe71950066249a7a329b461e9a7ec451ed0c4a7a9ed63a88f015a837bdf39e6
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":"https://codecov.io/github/RemedyIT/taox11/commit/a1949a2487fa7d1ee64e273d822aa049944f0527"}

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 https://github.com/RemedyIT/taox11/runs/3577509330?check_suite_focus=true 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
      with:
        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.

parsers:
  gcov:
    branch_detection:
      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.