From 1252ba665d35d00e2622bb4b902d53120182079c Mon Sep 17 00:00:00 2001 From: jc <46619361+juancwu@users.noreply.github.com> Date: Tue, 26 Nov 2024 13:16:07 -0500 Subject: [PATCH] move the coverage to html to test step --- .github/workflows/test-backend.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test-backend.yml b/.github/workflows/test-backend.yml index 1fdb5bd5..25f6ea72 100644 --- a/.github/workflows/test-backend.yml +++ b/.github/workflows/test-backend.yml @@ -42,10 +42,9 @@ jobs: # run tests and capture output cd backend go test -v -coverprofile=coverage.out ./... - - name: Generate coverage report - run: cd backend && go tool cover -html=coverage.out -o coverage.html + go tool cover -html=coverage.out -o coverage.html - name: Upload coverage report - if: ${{ !env.ACT && github.event_name == 'pull_request' }} + if: ${{ !env.ACT && github.event_name == 'pull_request' && always() }} uses: actions/upload-artifact@v4 with: name: coverage-report-backend