From 29839393c869f090ecf87e4295c320019426b9d7 Mon Sep 17 00:00:00 2001 From: Chun-Hung Tseng Date: Fri, 7 Jun 2024 15:49:56 +0200 Subject: [PATCH] Update codecov config to support commenting in PR Add missing directory fixing go.etcd.io/etcd/etcdutl/v3/::etcdutl/ Reference: - https://github.com/etcd-io/etcd/issues/18131 Signed-off-by: Chun-Hung Tseng --- .github/workflows/coverage.yaml | 4 +++- codecov.yml | 16 ++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/.github/workflows/coverage.yaml b/.github/workflows/coverage.yaml index 55903e4e0c55..125df1e54f81 100644 --- a/.github/workflows/coverage.yaml +++ b/.github/workflows/coverage.yaml @@ -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 diff --git a/codecov.yml b/codecov.yml index d8abfab76885..60f19672e7f0 100644 --- a/codecov.yml +++ b/codecov.yml @@ -1,12 +1,17 @@ --- +# 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: @@ -14,3 +19,14 @@ ignore: - '**/*.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]