From 043e3f58b29c4b81aab267205585cdd2f67a841e Mon Sep 17 00:00:00 2001 From: jc <46619361+juancwu@users.noreply.github.com> Date: Tue, 26 Nov 2024 13:13:11 -0500 Subject: [PATCH] generate backend html coverage --- .github/workflows/test-backend.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/test-backend.yml b/.github/workflows/test-backend.yml index 8363133..1fdb5bd 100644 --- a/.github/workflows/test-backend.yml +++ b/.github/workflows/test-backend.yml @@ -42,14 +42,14 @@ 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 - # - name: Upload coverage report - # if: ${{ !env.ACT && github.event_name == 'pull_request' }} - # uses: actions/upload-artifact@v4 - # with: - # name: coverage-report-backend - # path: backend/coverage.html + - name: Generate coverage report + run: cd backend && go tool cover -html=coverage.out -o coverage.html + - name: Upload coverage report + if: ${{ !env.ACT && github.event_name == 'pull_request' }} + uses: actions/upload-artifact@v4 + with: + name: coverage-report-backend + path: backend/coverage.html - name: Comment PR if: ${{ !env.ACT && github.event_name == 'pull_request' && always() }} uses: actions/github-script@v7