Post coverage comment #6702
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Post PR coverage comment using the artifact produced by the CI workflow. | |
| # Uses the two-workflow pattern recommended by | |
| # py-cov-action/python-coverage-comment-action so fork PRs do not need | |
| # write permissions on the test workflow. | |
| name: Post coverage comment | |
| on: | |
| workflow_run: | |
| workflows: ["CI"] | |
| types: | |
| - completed | |
| permissions: | |
| contents: read | |
| jobs: | |
| post-coverage-comment: | |
| if: >- | |
| github.event.workflow_run.event == 'pull_request' && | |
| github.event.workflow_run.conclusion == 'success' | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| actions: read | |
| steps: | |
| - name: Post coverage comment | |
| uses: py-cov-action/python-coverage-comment-action@63f52f4fbbffada6e8dee8ec432de7e01df9ba79 # v3.41 | |
| with: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| GITHUB_PR_RUN_ID: ${{ github.event.workflow_run.id }} |