From 68d4a6121d0e200366c63609d1e3cadb84651fed Mon Sep 17 00:00:00 2001 From: Prawirdani Date: Tue, 17 Sep 2024 19:58:27 +0700 Subject: [PATCH] changed coverage output to txt and add Codecov token --- .github/workflows/ci.yml | 5 +++-- Makefile | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9f567b2..9dacbc8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -30,7 +30,8 @@ jobs: run: | go get -d -v ./... make test:coverage + - name: Upload coverage to Codecov - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v4 with: - files: ./coverage.out + token: ${{ secrets.CODECOV_TOKEN }} diff --git a/Makefile b/Makefile index 4e569ab..ace3f94 100644 --- a/Makefile +++ b/Makefile @@ -1,11 +1,11 @@ -COVERAGE_FILE := coverage.out +COVERAGE_FILE := coverage.txt COVERAGE_HTML := coverage.html test: go test -v -count=1 -race ./... -cover test\:coverage: - go test -v -count=1 -race ./... -coverprofile=coverage.out + go test -v -count=1 -race ./... -coverprofile=$(COVERAGE_FILE) coverage-html: