Skip to content

Commit

Permalink
ci: comment test coverage in a separate job (#203)
Browse files Browse the repository at this point in the history
  • Loading branch information
npazosmendez authored Jan 9, 2025
1 parent 19ccf02 commit 65320b8
Showing 1 changed file with 20 additions and 3 deletions.
23 changes: 20 additions & 3 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,32 @@ 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
needs: test
permissions:
pull-requests: write
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
- 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 65320b8

Please sign in to comment.