From 22b225b72475940a7d0ff5d0baa701a962352ffe Mon Sep 17 00:00:00 2001 From: Edmar Felipe Date: Sun, 25 Aug 2024 18:49:15 -0300 Subject: [PATCH] chore: update Go build workflow to generate coverage badge --- .github/workflows/build.yml | 23 ++--------------------- 1 file changed, 2 insertions(+), 21 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 98705c2..ce7d107 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -61,12 +61,6 @@ jobs: set -euo pipefail go test -json -v ./... 2>&1 | tee /tmp/gotest.log | gotestfmt - # - name: Archive code coverage results - # uses: actions/upload-artifact@v4 - # with: - # name: code-coverage - # path: coverage.txt - - name: Show coverage details id: coverage-details run: | @@ -79,14 +73,14 @@ jobs: uses: irongut/CodeCoverageSummary@v1.3.0 with: filename: coverage.xml - badge: false + badge: true fail_below_min: false format: markdown hide_branch_rate: false hide_complexity: true indicators: true output: both - thresholds: '60 80' + thresholds: '40 70' - name: Add Coverage PR Comment if: github.event_name == 'pull_request' @@ -94,16 +88,3 @@ jobs: with: recreate: true path: code-coverage-results.md - - # coverage: - # name: "Code coverage report" - # if: github.event_name == 'pull_request' - # runs-on: ubuntu-latest - # needs: test - # permissions: - # contents: read - # actions: read # to download code coverage results from "test" job - # pull-requests: write # write permission needed to comment on PR - # steps: - # - uses: fgrosse/go-coverage-report@v1.0.2 -