Skip to content

Commit 38c2a9e

Browse files
authored
fix(ci): calculate coverage properly
We need to account tests covering certain packages but executed in other packages. Closes #6424
1 parent d998dd9 commit 38c2a9e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

.github/actions/build/action.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ runs:
4545
- name: Test new branch
4646
shell: bash
4747
run: |
48-
COVERAGE_OPTS="-covermode=count -coverprofile=coverage.out" make build
48+
COVERAGE_OPTS="-covermode=count -coverprofile=coverage.out -coverpkg=./..." make build
4949
5050
# Only run these on pull request events
5151
- name: Save new coverage value
@@ -73,7 +73,7 @@ runs:
7373
if: github.event_name == 'pull_request'
7474
shell: bash
7575
run: |
76-
COVERAGE_OPTS="-covermode=count -coverprofile=coverage.out" make build
76+
COVERAGE_OPTS="-covermode=count -coverprofile=coverage.out -coverpkg=./..." make build
7777
# Remove mock and generated code from account
7878
grep -v "github.com/apache/camel-k/v2/pkg/client" coverage.out \
7979
| grep -v "zz_generated" \
@@ -85,4 +85,4 @@ runs:
8585
if: github.event_name == 'pull_request'
8686
with:
8787
name: ${{ inputs.artifact-name }}
88-
path: /tmp/${{ inputs.artifact-name }}/
88+
path: /tmp/${{ inputs.artifact-name }}/

0 commit comments

Comments
 (0)