From 04652e620fbdc1ad125014064182f646b825cb75 Mon Sep 17 00:00:00 2001 From: Uday Patil Date: Fri, 20 Jun 2025 12:13:55 -0400 Subject: [PATCH] Upload codecov coverage properly --- .github/workflows/unit_tests.yml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/unit_tests.yml b/.github/workflows/unit_tests.yml index fc0d1b82e7..8c3d29c5db 100644 --- a/.github/workflows/unit_tests.yml +++ b/.github/workflows/unit_tests.yml @@ -52,12 +52,19 @@ jobs: run: go get github.com/wadey/gocovmerge && go install github.com/wadey/gocovmerge - name: Merge coverage reports - run: gocovmerge $(find . -type f -name '*profile.out') > coverage.txt + run: gocovmerge $(find . -type f -name '*coverage.out') > coverage.txt - name: Check coverage report lines run: wc -l coverage.txt continue-on-error: true - name: Check coverage report files - run: ls **/*profile.out - continue-on-error: true \ No newline at end of file + run: ls **/*coverage.out + continue-on-error: true + + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v4 + with: + file: ./coverage.txt + token: ${{ secrets.CODECOV_TOKEN }} + fail_ci_if_error: true \ No newline at end of file