Skip to content

Commit

Permalink
chore: update Go build workflow to generate coverage badge
Browse files Browse the repository at this point in the history
  • Loading branch information
edmarfelipe committed Aug 25, 2024
1 parent 7ba2cd5 commit 22b225b
Showing 1 changed file with 2 additions and 21 deletions.
23 changes: 2 additions & 21 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand All @@ -79,31 +73,18 @@ 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'
uses: marocchino/sticky-pull-request-comment@v2
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

0 comments on commit 22b225b

Please sign in to comment.