Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update codecov config to support commenting in PR #18143

Merged
merged 1 commit into from
Jun 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/coverage.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
---
name: Coverage
on: [push]
on: [push, pull_request]
permissions: read-all
jobs:
coverage:
# this is to prevent the job to run at forked projects
if: github.repository == 'etcd-io/etcd'
runs-on: ubuntu-latest
strategy:
fail-fast: false
Expand Down
16 changes: 16 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,32 @@
---
# https://docs.codecov.com/docs/codecovyml-reference
codecov:
token: 6040de41-c073-4d6f-bbf8-d89256ef31e1
disable_default_path_fixes: true
require_ci_to_pass: false
notify:
wait_for_ci: false
fixes:
- go.etcd.io/etcd/api/v3/::api/
- go.etcd.io/etcd/client/v3/::client/v3/
- go.etcd.io/etcd/client/v2/::client/v2/
- go.etcd.io/etcd/etcdctl/v3/::etcdctl/
- go.etcd.io/etcd/etcdutl/v3/::etcdutl/
- go.etcd.io/etcd/pkg/v3/::pkg/
- go.etcd.io/etcd/server/v3/::server/
ignore:
- '**/*.pb.go'
- '**/*.pb.gw.go'
- tests/**/*
- go.etcd.io/etcd/tests/**/*
coverage:
range: 60..80
round: down
precision: 2
comment:
layout: "header, files, diff, footer"
behavior: default # default: update, if exists. Otherwise post new; new: delete old and post new
require_changes: false # if true: only post the comment if coverage changes
require_base: false # [true :: must have a base report to post]
require_head: true # [true :: must have a head report to post]
hide_project_coverage: false # [true :: only show coverage on the git diff]
1 change: 1 addition & 0 deletions scripts/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,7 @@ function merge_cov {
merge_cov_files "${coverdir}" "${coverdir}/all.coverprofile"
}

# https://docs.codecov.com/docs/unexpected-coverage-changes#reasons-for-indirect-changes
function cov_pass {
# shellcheck disable=SC2153
if [ -z "${COVERDIR:-}" ]; then
Expand Down
Loading