Skip to content

coverage_comment

coverage_comment #21

name: 'coverage_comment'
# This workflow runs after the 'Verify packages abilities' workflow is completed for a pull request.
# The workflow downloads the coverage report if the 'Verify packages abilities' workflow was successful.
# The workflow then adds a comment to the PR with the coverage report.
on:
workflow_run:
workflows: ['Verify packages abilities']
types:
- completed
jobs:
download_coverage:
runs-on: ubuntu-latest
if: github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion == 'success'
steps:
- name: Download artifact
id: download-artifact
uses: dawidd6/action-download-artifact@v3
with:
workflow: tests.yml
workflow_conclusion: success
run_id: ${{ github.event.workflow_run.id }}
name: code-coverage-results.md
- run: echo "${{ github.event.workflow_run.pull_requests[0].number }}"
- run: echo "${{ github.event }}"
- name: Add PR comment
uses: marocchino/sticky-pull-request-comment@v2
with:
number: ${{ github.event.workflow_run.pull_requests[0].number }}
recreate: true
path: code-coverage-results.md