From 753438148b885bf42ed4b823175f2e50ae78f3c1 Mon Sep 17 00:00:00 2001 From: Shubham Gupta <69793468+shubham-cmyk@users.noreply.github.com> Date: Sat, 21 Oct 2023 13:05:15 +0530 Subject: [PATCH] add code-cov (#675) Signed-off-by: Shubham Gupta --- .github/workflows/operator-ci.yaml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/operator-ci.yaml b/.github/workflows/operator-ci.yaml index bae7dc7b2..7a526277a 100644 --- a/.github/workflows/operator-ci.yaml +++ b/.github/workflows/operator-ci.yaml @@ -54,8 +54,14 @@ jobs: uses: actions/setup-go@v2 with: go-version: ${{ env.GolangVersion }} - - name: Run Go Tests - run: go test ./... + - name: Run Go Tests with coverage + run: go test ./... -coverprofile=coverage.txt -covermode=atomic + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v2 + with: + file: ./coverage.txt + fail_ci_if_error: true + verbose: true code_quality_golang_ci_lint: needs: [gofmt, govet]