From d33f82169c5c9b4f7bad3ba1487204262e526ca0 Mon Sep 17 00:00:00 2001 From: Jonas-Taha El Sesiy Date: Tue, 13 Aug 2024 13:23:16 -0700 Subject: [PATCH] codecov --- .github/workflows/ci.yml | 7 +++---- .gitignore | 2 +- Makefile | 5 +++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4d2c0f3..2654a33 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 }} diff --git a/.gitignore b/.gitignore index d027cbb..c46c5bd 100644 --- a/.gitignore +++ b/.gitignore @@ -5,4 +5,4 @@ Thumbs.db .vscode kubectl-view-secret -cover.* +coverage.txt diff --git a/Makefile b/Makefile index 4dab7ed..115b178 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,6 @@ SOURCES := $(shell find . -name '*.go') BINARY := kubectl-view-secret +COV_REPORT := "coverage.txt" build: kubectl-view-secret @@ -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)