This is an automated email from the ASF dual-hosted git repository.

pcongiusti pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-k.git


The following commit(s) were added to refs/heads/main by this push:
     new 765b653aa fix(ci): badge update
765b653aa is described below

commit 765b653aa99f272e6584661affdfc94fc0713fba
Author: Pasquale Congiusti <[email protected]>
AuthorDate: Fri Aug 16 09:53:35 2024 +0200

    fix(ci): badge update
---
 .github/actions/automatic-updates/action.yml | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/.github/actions/automatic-updates/action.yml 
b/.github/actions/automatic-updates/action.yml
index d163a2832..5adbb7bec 100644
--- a/.github/actions/automatic-updates/action.yml
+++ b/.github/actions/automatic-updates/action.yml
@@ -67,8 +67,14 @@ runs:
       shell: bash
       run: |
         go test -v ./... -covermode=count -coverprofile=coverage.out
-        go tool cover -func=coverage.out -o=coverage.out
-        grep -o -P '(?<=\(statements\))(.+)(?=%)' coverage.out | xargs > 
coverage
+        # Remove mock and generated code from account
+        grep -v "github.com/apache/camel-k/v2/pkg/client" coverage.out \
+          | grep -v "zz_generated" \
+          | grep -v "github.com/apache/camel-k/v2/addons/strimzi/duck/" \
+          | grep -v "github.com/apache/camel-k/v2/addons/keda/duck/" \
+          | grep -v "github.com/apache/camel-k/v2/cmd/util"  > coverage.mod.out
+        go tool cover -func=coverage.mod.out -o=coverage.mod.out
+        grep -o -P '(?<=\(statements\))(.+)(?=%)' coverage.mod.out | xargs > 
coverage
         touch badge.out
     - name: Go coverage badge
       uses: ./.github/actions/coverage-badge

Reply via email to