Skip to content

Commit 1ce96f2

Browse files
authored
Give up on getting Coverage comment in pull request itself. (#3162)
The `madrapps/jacoco-report` plugin does not have a way of setting the base sha for the `workflow_run` case and so won't get the proper diffs. Instead put it inline in the `pull_request` workflow (which does not have access to add PR comments) and there just write to job summary.
1 parent 77a6c7c commit 1ce96f2

File tree

2 files changed

+8
-52
lines changed

2 files changed

+8
-52
lines changed

.github/workflows/pull_request.yml

+8-9
Original file line numberDiff line numberDiff line change
@@ -139,13 +139,12 @@ jobs:
139139
name: coverage-report
140140
path: |
141141
${{ github.workspace }}/.out/reports/jacoco/codeCoverageReport/
142-
- name: Save Pull Request Number
143-
run: echo ${{ github.event.number }} >.pr_number
144-
- name: Upload Pull Request Number
145-
uses: actions/[email protected]
142+
- name: Add Coverage Summary
143+
uses: madrapps/jacoco-report@e4bbaf00a0b8920cb86a448ae3ec0fc6f6bfeacc
146144
with:
147-
name: pull-request-number
148-
path: |
149-
${{ github.workspace }}/.pr_number
150-
include-hidden-files: true
151-
retention-days: 1
145+
paths: |
146+
${{ github.workspace }}/.out/reports/jacoco/codeCoverageReport/codeCoverageReport.xml
147+
token: ${{ secrets.GITHUB_TOKEN }}
148+
comment-type: summary
149+
min-coverage-overall: 75
150+
min-coverage-changed-files: 80

.github/workflows/pull_request_comments.yml

-43
This file was deleted.

0 commit comments

Comments
 (0)