Skip to content

Commit

Permalink
ci: comment test coverage in a separate job
Browse files Browse the repository at this point in the history
  • Loading branch information
npazosmendez committed Jan 9, 2025
1 parent 19ccf02 commit 04c74b0
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,27 @@ jobs:
go-version: ${{ env.GO_VERSION }}
- name: Run Tests
run: go test -coverprofile coverage.out ./...
- name: Save Coverage Report
uses: actions/upload-artifact@v4
with:
name: coverage-report
path: coverage.out
comment-coverage:
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- name: Download Coverage Report
uses: actions/download-artifact@v4
with:
name: coverage-report
- name: Generate Coverage Summary
run: go run ci/cmd/coverage/main.go -f coverage.out > comment.txt
- name: Comment Coverage Summary
# This will update the comment in place on successive runs
uses: mshick/add-pr-comment@v2
with:
message-path: comment.txt


message-path: comment.txt
acceptance:
runs-on: ubuntu-latest
steps:
Expand Down

0 comments on commit 04c74b0

Please sign in to comment.