Skip to content

Commit

Permalink
add code cov
Browse files Browse the repository at this point in the history
  • Loading branch information
elsesiy committed Aug 13, 2024
1 parent 5078268 commit 1373b9d
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
7 changes: 7 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,10 @@ jobs:
run: make bootstrap
- name: Test
run: make test
- name: Generate coverage report
run: make test-cov
- name: check test coverage
uses: vladopajic/go-test-coverage@v2
with:
profile: cover.out
local-prefix: github.com/elsesiy/kubectl-view-secret
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ Thumbs.db
.idea
.vscode

kubectl-view-secret
kubectl-view-secret
cover.*
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ bootstrap:
test: $(SOURCES)
go test -v -short -race -timeout 30s ./...

test-cov:
go test ./... -coverprofile=./cover.out -covermode=atomic -coverpkg=./...
go tool cover -html=cover.out

clean:
@rm -rf $(BINARY)
@kind delete cluster --name kvs-test
Expand Down

0 comments on commit 1373b9d

Please sign in to comment.