Skip to content

Post coverage comment #31

Post coverage comment

Post coverage comment #31

Workflow file for this run

name: Post coverage comment
on:
workflow_run:
workflows: ["UnitTests"]
types:
- completed
workflow_dispatch:
jobs:
test:
name: Run tests & display coverage
runs-on: ubuntu-latest
# This ensures it ONLY runs on PR events, not pushes to main
if: github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion == 'success'
permissions:
pull-requests: write
contents: write
actions: read
steps:
- name: Post comment
uses: py-cov-action/python-coverage-comment-action@v3
with:
GITHUB_PR_RUN_ID: ${{ github.event.workflow_run.id }}
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}