Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions .github/workflows/coverage_comment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:

permissions:
contents: read
actions: read
pull-requests: write

jobs:
Expand All @@ -20,16 +21,22 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- name: Download diff coverage report
- name: Download coverage artifacts
uses: actions/download-artifact@v4
with:
name: diff-coverage-report-${{ github.event.workflow_run.pull_requests[0].number }}
name: coverage-artifacts
github-token: ${{ secrets.GITHUB_TOKEN }}
run-id: ${{ github.event.workflow_run.id }}

- name: Read PR number
id: pr
run: |
pr_number=$(cat pr_number.txt)
echo "number=$pr_number" >> $GITHUB_OUTPUT

- name: Post/update PR comment
env:
PR_NUMBER: ${{ github.event.workflow_run.pull_requests[0].number }}
PR_NUMBER: ${{ steps.pr.outputs.number }}
uses: actions/github-script@v8
with:
script: |
Expand Down
12 changes: 9 additions & 3 deletions .github/workflows/coverage_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,16 @@ jobs:
Set-Content -Path diff-cover-report.md -Value 'No coverage data available.'
}

- name: Upload diff coverage report
- name: Save PR number
if: success()
run: echo "${{ github.event.pull_request.number }}" > pr_number.txt

- name: Upload artifacts
if: success()
uses: actions/upload-artifact@v4
with:
name: diff-coverage-report-${{ github.event.pull_request.number }}
path: diff-cover-report.md
name: coverage-artifacts
path: |
diff-cover-report.md
pr_number.txt
retention-days: 1