Codecov doesn't fail the CI - github actions

Please search for similar issues before creating a ticket.
All fields below are required.


I’ve setup the CI with codecov. It shows the report. It doesn’t fail the CI though and reports success.


Codecov Output

==> linux OS detected
==> SHASUM file signed by key id 806bb28aed779869
==> Uploader SHASUM verified (be64e2915c5f1ca777044cf1994d474dc9b4d6fe74339111163b00dbb4c1b9d3  codecov)
==> Running version latest
==> Running version v0.1.18
/home/runner/work/_actions/codecov/codecov-action/v2/dist/codecov -n codecov-umbrella -Q github-action-2.1.0 -Z -f ./coverage/ -F unittests -C 7e82b31ee4bda75ab29399c52d4579c64536042a -s ./coverage/ -v
[2022-03-15T11:59:18.094Z] ['verbose'] Start of uploader: 1647345558094...
[2022-03-15T11:59:18.097Z] ['info'] 
     _____          _
    / ____|        | |
   | |     ___   __| | ___  ___ _____   __
   | |    / _ \ / _` |/ _ \/ __/ _ \ \ / /
   | |___| (_) | (_| |  __/ (_| (_) \ V /
    \_____\___/ \__,_|\___|\___\___/ \_/

  Codecov report uploader 0.1.18
[2022-03-15T11:59:18.103Z] ['info'] => Project root located at: /home/runner/work/vivid-3/vivid-3
[2022-03-15T11:59:18.108Z] ['info'] -> No token specified or token is empty
[2022-03-15T11:59:18.108Z] ['verbose'] Start of network processing...
[2022-03-15T11:59:18.108Z] ['verbose'] Searching for files in /home/runner/work/vivid-3/vivid-3
[2022-03-15T11:59:18.113Z] ['info'] Searching for coverage files...
[2022-03-15T11:59:18.155Z] ['verbose'] Preparing to clean the following coverage paths: ./coverage/
[2022-03-15T11:59:18.155Z] ['info'] => Found 1 possible coverage files:
[2022-03-15T11:59:18.155Z] ['verbose'] End of network processing
[2022-03-15T11:59:18.156Z] ['info'] Processing ./coverage/
[2022-03-15T11:59:18.161Z] ['info'] Detected GitHub Actions as the CI provider.
[2022-03-15T11:59:18.161Z] ['verbose'] -> Using the following env variables:
[2022-03-15T11:59:18.161Z] ['verbose']      GITHUB_ACTION: __codecov_codecov-action
[2022-03-15T11:59:18.162Z] ['verbose']      GITHUB_HEAD_REF: block-PR-if-coverage-drops
[2022-03-15T11:59:18.162Z] ['verbose']      GITHUB_REF: refs/pull/254/merge
[2022-03-15T11:59:18.162Z] ['verbose']      GITHUB_REPOSITORY: Vonage/vivid-3
[2022-03-15T11:59:18.162Z] ['verbose']      GITHUB_RUN_ID: 1986485916
[2022-03-15T11:59:18.162Z] ['verbose']      GITHUB_SERVER_URL:
[2022-03-15T11:59:18.162Z] ['verbose']      GITHUB_SHA: 1dd8cbeefdc461f0a24534f2f0fea0197b07e2c4
[2022-03-15T11:59:18.162Z] ['verbose']      GITHUB_WORKFLOW: Pull Request
[2022-03-15T11:59:18.162Z] ['verbose'] Using the following upload parameters:
[2022-03-15T11:59:18.162Z] ['verbose'] branch
[2022-03-15T11:59:18.162Z] ['verbose'] build
[2022-03-15T11:59:18.163Z] ['verbose'] buildURL
[2022-03-15T11:59:18.163Z] ['verbose'] commit
[2022-03-15T11:59:18.163Z] ['verbose'] job
[2022-03-15T11:59:18.163Z] ['verbose'] pr
[2022-03-15T11:59:18.163Z] ['verbose'] service
[2022-03-15T11:59:18.163Z] ['verbose'] slug
[2022-03-15T11:59:18.163Z] ['verbose'] name
[2022-03-15T11:59:18.163Z] ['verbose'] tag
[2022-03-15T11:59:18.163Z] ['verbose'] flags
[2022-03-15T11:59:18.163Z] ['verbose'] parent
[2022-03-15T11:59:18.164Z] ['info'] Pinging Codecov:*******&branch=block-PR-if-coverage-drops&build=1986485916&
[2022-03-15T11:59:18.164Z] ['verbose'] Passed token was 0 characters long
[2022-03-15T11:59:18.164Z] ['verbose']
        Content-Type: 'text/plain'
        Content-Encoding: 'gzip'
        X-Reduced-Redundancy: 'false'
[2022-03-15T11:59:18.695Z] ['info']
[2022-03-15T11:59:18.696Z] ['verbose'] Returned upload url:
[2022-03-15T11:59:18.696Z] ['info'] Uploading...
[2022-03-15T11:59:18.863Z] ['info'] {"status":"success","resultURL":""}
[2022-03-15T11:59:18.863Z] ['verbose'] End of uploader: 769 milliseconds

Expected Results

I’d expect the CI to fail as I intentionally dropped coverage from 95% to 85%.

Actual Results

CI passed

Additional Information

The whole repo is open source: GitHub - Vonage/vivid-3: Vonage's web UI 🎨 toolbelt

Can you try adding the Codecov GitHub app?

Thanks for your reply.
Is using the app a must? Can’t I just use the github action?

There’s a discrepancy between the codecov UI and the response returned from the github action:
In the codecov UI it shows the CI fails, as shown in the image above. Also, when I check the codecov.yml file I see my config as I’ve set it in the branch.
The CI itself passed as I get a success response from codecov

The app is a must, it allows us to interface with GitHub for API calls.

Do you mind sharing a link for the CI discrepancy?

We’ve activated and configured the app.
This has solved the issue.

1 Like