Skip to content

Commit

Permalink
Coverage comment experiment
Browse files Browse the repository at this point in the history
I noticed that all of the comments are being sent to #3147, the change which introduced `pull_request_comments.yml`, which I think is a mistake. To avoid that,
this tries to use a job within the PR
  • Loading branch information
alecgrieser committed Feb 13, 2025
1 parent 1df5e2e commit 6c45069
Showing 1 changed file with 29 additions and 1 deletion.
30 changes: 29 additions & 1 deletion .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ jobs:
# 2. core-tests: Runs the fdb-record-layer-core tests. This is the longest test suite of the
# various subprojects, so separating it out allows us to speed up the PRB time.
# 3. other-tests: Runs the rest of the tests. This tests everything else
# 4. coverage: Merges the JaCoCo output of 2 and 3 and generates reports.
#
# Once those complete, we have two jobs to handle publishing coverage information:
# 1. coverage: Merges the JaCoCo output of 2 and 3 and generates reports.
# 2. coverage-comment: Comments the final report

style:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -139,3 +142,28 @@ jobs:
name: coverage-report
path: |
${{ github.workspace }}/.out/reports/jacoco/codeCoverageReport/
coverage-comment:
runs-on: ubuntu-latest
needs: coverage
permissions:
checks: write
contents: read
pull-requests: write
steps:
- name: Setup Base Environment
uses: ./actions/setup-base-env
- name: Download report
uses: actions/download-artifact@v4
with:
pattern: coverage-report.zip
- name: 'Unzip artifact(s)'
run: unzip coverage-report.zip codeCoverageReport.xml
- name: Test Coverage Comment
uses: madrapps/jacoco-report@e4bbaf00a0b8920cb86a448ae3ec0fc6f6bfeacc
with:
paths: |
${{ github.workspace }}/codeCoverageReport.xml
token: ${{ secrets.GITHUB_TOKEN }}
min-coverage-overall: 75
min-coverage-changed-files: 80

0 comments on commit 6c45069

Please sign in to comment.