|
| 1 | +# For more configuration details: |
| 2 | +# https://docs.codecov.io/docs/codecov-yaml |
| 3 | + |
| 4 | +# After making edits, check if this file is valid by running: |
| 5 | +# curl -X POST --data-binary @.codecov.yml https://codecov.io/validate |
| 6 | + |
| 7 | +# |
| 8 | +# Coverage configuration |
| 9 | +# ---------------------- |
| 10 | +# |
| 11 | +github_checks: |
| 12 | + # |
| 13 | + # On adding coverage annotations to the code in the GitHub |
| 14 | + # Code Review for now: |
| 15 | + # |
| 16 | + # - The annotations consume a lot of space in the PR code review, |
| 17 | + # and can make it hard to review files that are not covered yet. |
| 18 | + # |
| 19 | + # - The coverage can be visited using the Codecov link at all times. |
| 20 | + # https://app.codecov.io/gh/xapi-project/xen-api/pulls |
| 21 | + # |
| 22 | + # - The annotations can be hidden in GitHub PR code review by |
| 23 | + # pressing the "a" key or by deselecting the "Show comments" |
| 24 | + # checkbox but they are shown by default. |
| 25 | + # |
| 26 | + # - The Codecov Chrome and Firefox extension is a much nicer |
| 27 | + # way to indicate coverage: |
| 28 | + # |
| 29 | + # Link: https://github.com/codecov/codecov-browser-extension |
| 30 | + # |
| 31 | + # - How to enable: You need to log in to Codecov using Github. |
| 32 | + # For Firefox, enable the needed permissions: |
| 33 | + # https://github.com/codecov/codecov-browser-extension/issues/50 |
| 34 | + # |
| 35 | + # Reference: |
| 36 | + # http://docs.codecov.com/docs/common-recipe-list#disable-github-check-run-annotations |
| 37 | + # |
| 38 | + annotations: true |
| 39 | + |
| 40 | +# |
| 41 | +# Pull request comments: |
| 42 | +# ---------------------- |
| 43 | +# This feature adds the code coverage summary as a comment on each PR. |
| 44 | +# See https://docs.codecov.io/docs/pull-request-comments |
| 45 | +# This same information is available from the Codecov checks in the PR's |
| 46 | +# "Checks" tab in GitHub even when this feature is disabled. |
| 47 | +# |
| 48 | +comment: |
| 49 | + # |
| 50 | + # Legend: |
| 51 | + # "diff" is the Coverage Diff of the pull request. |
| 52 | + # "files" are the files impacted by the pull request |
| 53 | + # "flags" are the coverage status of the pull request |
| 54 | + # |
| 55 | + # For an even shorter layout, this may be used: |
| 56 | + # layout: "condensed_header, diff, files, flags" |
| 57 | + # |
| 58 | + layout: "header, diff, files, flags" |
| 59 | + |
| 60 | + # |
| 61 | + # Add the Codecov comment to the PR when coverage changes always for testing |
| 62 | + # |
| 63 | + require_changes: false |
| 64 | + |
| 65 | + # |
| 66 | + # The overall project coverage is secondary to the individual coverage |
| 67 | + # and it is always shown in the repository at: |
| 68 | + # - https://app.codecov.io/gh/xenserver/python-libs |
| 69 | + # |
| 70 | + hide_project_coverage: true |
| 71 | + |
| 72 | +coverage: |
| 73 | + # |
| 74 | + # Number of precision digits when showing coverage percentage e.g. 88.8%. |
| 75 | + # One precision digit is also used by coverage.py when reporting coverage: |
| 76 | + # |
| 77 | + precision: 1 |
| 78 | + |
| 79 | + status: |
| 80 | + |
| 81 | + # |
| 82 | + # Patch coverage is the incremental change in coverage in a PR |
| 83 | + # |
| 84 | + patch: |
| 85 | + default: false # disable the default status that measures entire project |
| 86 | + |
| 87 | + tests: |
| 88 | + paths: ["tests/"] # only include coverage in "tests/" folder |
| 89 | + target: auto # don't reduce coverage on test code lines |
| 90 | + |
| 91 | + python-libs: # declare a new status context "python-libs" |
| 92 | + paths: ["xcp/"] # library code |
| 93 | + target: 0 # Temporarily allow 0% coverage to allow to merge dmv.py, |
| 94 | + # Project threshold sets a lower bound to not go further. |
| 95 | + |
| 96 | + # |
| 97 | + # Project coverage is the absolute coverage of the entire project |
| 98 | + # |
| 99 | + project: |
| 100 | + default: false # disable the default status that measures entire project |
| 101 | + |
| 102 | + tests: # declare a new status context "tests" |
| 103 | + paths: ["tests/"] # only include coverage in "tests/" folder |
| 104 | + target: 99% # we always want 99% coverage here |
| 105 | + |
| 106 | + python-libs: # declare a new status context "python-libs" |
| 107 | + paths: ["xcp/"] # library code |
| 108 | + target: 78% # Coverage should not be reduced compared to its base |
0 commit comments