Support branch coverage #109
Workflow file for this run
This file contains 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
name: My Pytest Coverage Comment | |
on: | |
pull_request: | |
permissions: | |
contents: write | |
checks: write | |
pull-requests: write | |
jobs: | |
live-test: | |
name: Live Test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Pytest coverage comment | |
id: coverageComment | |
uses: MishaKav/pytest-coverage-comment@main | |
with: | |
pytest-coverage-path: ./data/pytest-coverage_4.txt | |
junitxml-path: ./data/pytest_1.xml | |
- name: Check the output coverage | |
run: | | |
echo "Coverage Percentage - ${{ steps.coverageComment.outputs.coverage }}" | |
echo "Coverage Color - ${{ steps.coverageComment.outputs.color }}" | |
echo "Coverage Html - ${{ steps.coverageComment.outputs.coverageHtml }}" | |
echo "Coverage Warnings - ${{ steps.coverageComment.outputs.warnings }}" | |
echo "Coverage Errors - ${{ steps.coverageComment.outputs.errors }}" | |
echo "Coverage Failures - ${{ steps.coverageComment.outputs.failures }}" | |
echo "Coverage Skipped - ${{ steps.coverageComment.outputs.skipped }}" | |
echo "Coverage Tests - ${{ steps.coverageComment.outputs.tests }}" | |
echo "Coverage Time - ${{ steps.coverageComment.outputs.time }}" | |
echo "Not Success Test Info - ${{ steps.coverageComment.outputs.notSuccessTestInfo }}" | |
- name: Create the Badge | |
uses: schneegans/[email protected] | |
with: | |
auth: ${{ secrets.PYTEST_COVERAGE_COMMENT }} | |
gistID: 5e90d640f8c212ab7bbac38f72323f80 | |
filename: pytest-coverage-comment__main.json | |
label: Coverage Report | |
message: ${{ steps.coverageComment.outputs.coverage }} | |
color: ${{ steps.coverageComment.outputs.color }} | |
namedLogo: python |