Codecov not failing Github action check

Viewed 355

I have a private Github repository that I'd like to integrate with Codecov and check coverage on each PR that's opened. Everything is fine as far as generating the coverage report and uploading that report to Codecov, but I'm having trouble having the Github check fail if test coverage of the project does not meet a certain percentage.

For reference, my codecode.yml config for the repo is:

codecov:
  require_ci_to_pass: yes

coverage:
  precision: 2
  round: down
  range: '90...100'
  status:
    project:
      default: # This can be anything, but it needs to exist as the name
        # basic settings
        target: 90%
        threshold: 0%
        if_ci_failed: error #success, failure, error, ignore
        only_pulls: false
    patch:
      default:
        target: auto
        threshold: 0%

parsers:
  gcov:
    branch_detection:
      conditional: yes
      loop: yes
      method: no
      macro: no

comment:
  layout: 'reach,diff,flags,files,footer'
  behavior: default
  require_changes: no
0 Answers
Related