Skip to content

Commit

Permalink
fix: coverage report generation for k8s_env tests
Browse files Browse the repository at this point in the history
Signed-off-by: tesla59 <[email protected]>
  • Loading branch information
tesla59 committed May 20, 2024
1 parent 294ed3b commit a844c46
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
8 changes: 3 additions & 5 deletions .github/workflows/ci-test-ginkgo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,14 +117,12 @@ jobs:
- name: Measure code coverage
if: ${{ always() }}
run: |
go install github.com/modocache/gover@latest
gover
go tool cover -func=gover.coverprofile
working-directory: KubeArmor
go tool cover -func=coverprofile.out
working-directory: ./tests/k8s_env
env:
GOPATH: /home/runner/go

- uses: codecov/codecov-action@v3
if: ${{ always() }}
with:
files: ./KubeArmor/gover.coverprofile
files: ./tests/k8s_env/coverprofile.out
4 changes: 2 additions & 2 deletions tests/k8s_env/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ build:
@go mod tidy
# run in two steps as syscall suite fails if run at the very end
# see - https://github.com/kubearmor/KubeArmor/issues/1269
@ginkgo --vv --flake-attempts=10 --timeout=10m syscalls/
@ginkgo -r --vv --flake-attempts=10 --timeout=30m --skip-package "syscalls"
@ginkgo --vv --flake-attempts=10 --timeout=10m --coverpkg=github.com/kubearmor/KubeArmor/tests/... syscalls/
@ginkgo -r --vv --flake-attempts=10 --timeout=30m --coverpkg=github.com/kubearmor/KubeArmor/tests/... --skip-package "syscalls"
.PHONY: test
test:
@ginkgo -r -v

0 comments on commit a844c46

Please sign in to comment.