File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed
Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -346,6 +346,28 @@ jobs:
346346 path : python-coverage-comment-action.txt
347347` ` `
348348
349+ ### Outputs
350+
351+ The action makes available some data for downstream processing:
352+
353+ - COMMENT_FILE_WRITTEN: A boolean indicating whether a comment file was written to COMMENT_FILENAME or not. Only set when running in PR mode.
354+ - COVERAGE_PERCENTAGE: The coverage percentage of the pull request.
355+ - REFERENCE_COVERAGE_PERCENTAGE: The coverage percentage of the base branch.
356+
357+ Usage may look like this
358+
359+ ` ` ` yaml
360+ - name : Coverage comment
361+ id : coverage_comment
362+ uses : py-cov-action/python-coverage-comment-action@v3
363+ with :
364+ GITHUB_TOKEN : ${{ github.token }}
365+
366+ - name : Enforce coverage
367+ if : ${{ steps.coverage_comment.outputs.COVERAGE_PERCENTAGE < steps.coverage_comment.outputs.REFERENCE_COVERAGE_PERCENTAGE }}
368+ run : echo "Coverage decreased." && exit 1
369+ ` ` `
370+
349371### All options
350372
351373` ` ` yaml
You can’t perform that action at this time.
0 commit comments