Skip to content

Commit

Permalink
Update codecov.yml (antrea-io#4226)
Browse files Browse the repository at this point in the history
1. Codecov do not comment until at least 5 builds have been uploaded
from the CI pipeline. By default codecov will post and/or update the
pull request comment after it processes each report uploaded for a
particular pull request commit. As the Antrea CI process uploads many
reports to codecov, this can be confusing for team members viewing the
pull request as reports are processing.
2. patch/status ensures the patch lines cov > 65%(ut or e2e/integration).
3. project/status ensures the project ut cov not decrease.
4. Set carryforward: false, as the Carryforward Flags are designed for
projects that do not upload total coverage for every commit.

Signed-off-by: Wenqi Qiu <[email protected]>
  • Loading branch information
wenqiq authored Mar 17, 2023
1 parent 4a80363 commit 99160cd
Showing 1 changed file with 15 additions and 20 deletions.
35 changes: 15 additions & 20 deletions codecov.yaml
Original file line number Diff line number Diff line change
@@ -1,53 +1,48 @@
codecov:
# The default branch is used to identify:
# Which branch to cache the repository YAML for UI changes.
# Which branch is the first branch on the repository dashboard in Codecov.
branch: main
# Show the Codecov status without waiting for other status checks to complete or pass.
require_ci_to_pass: no

comment:
layout: "reach,diff,flags,tree"
behavior: default
require_changes: no
require_base: no
require_head: no
after_n_builds: 1
show_carryforward_flags: true
comment: false

github_checks:
# Specify whether to use GitHub Checks annotations or normal statuses.
annotations: true

coverage:
status:
patch:
default:
# Choose a minimum coverage ratio that the commit must meet to be considered a success.
# <number> specify a target of an exact coverage number.
target: 70%
# Allow the coverage to drop by X%, and posting a success status.
threshold: 5%
# Use the pull request base if the commit is on a pull request. If not, the parent commit will be used.
base: auto
# Only post a status to pull requests.
only_pulls: true
flags:
- unit-tests
project:
default:
# `auto` will use the coverage from the base commit (pull request base or parent commit) coverage to compare against.
target: auto
antrea-unit-tests:
target: auto
# Flags are a list of user defined Flags, and the impact on their coverage.
flags:
- unit-tests
antrea-integration-tests:
target: auto
flags:
- integration-tests
antrea-e2e-tests:
target: auto
flags:
- e2e-tests
antrea-kind-e2e-tests:
target: auto
flags:
- kind-e2e-tests


flag_management:
default_rules:
carryforward: true

# Exclude files from being collected by Codecov. Ignored files will be skipped during processing.
ignore:
- "**/testing/*.go"
- "**/mock_*.go"
Expand Down

0 comments on commit 99160cd

Please sign in to comment.