Skip to content

Commit

Permalink
codecov
Browse files Browse the repository at this point in the history
  • Loading branch information
elsesiy committed Aug 13, 2024
1 parent bd3f494 commit d33f821
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ jobs:
run: make test
- name: Generate coverage report
run: make test-cov
- name: check test coverage
uses: vladopajic/go-test-coverage@v2
- name: Upload results to Codecov
uses: codecov/codecov-action@v4
with:
profile: cover.out
local-prefix: github.com/elsesiy/kubectl-view-secret
token: ${{ secrets.CODECOV_TOKEN }}
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ Thumbs.db
.vscode

kubectl-view-secret
cover.*
coverage.txt
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
SOURCES := $(shell find . -name '*.go')
BINARY := kubectl-view-secret
COV_REPORT := "coverage.txt"

build: kubectl-view-secret

Expand All @@ -10,8 +11,8 @@ 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
go test ./... -coverprofile=$(COV_REPORT)
go tool cover -html=$(COV_REPORT)

clean:
@rm -rf $(BINARY)
Expand Down

0 comments on commit d33f821

Please sign in to comment.