forked from py-cov-action/python-coverage-comment-action
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaction.yml
80 lines (80 loc) · 2.91 KB
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
name: Python Coverage Comment
branding:
icon: 'umbrella'
color: 'purple'
description: >
Publish diff coverage report as PR comment, and create a coverage badge
to display on the readme.
inputs:
GITHUB_TOKEN:
description: >
A GitHub token to write comments and write the badge & coverage data
to the repository.
Set to `$ {{ github.token }}` (without the space between `$` and `{`).
required: true
GITHUB_PR_RUN_ID:
description: >
Only useful on the "workflow_run" part of the workflow.
Set to `$ {{ github.event.workflow_run.id }}` (without the space between `$` and `{`).
required: false
COMMENT_TEMPLATE:
description: >
[Advanced] Specify a different template for the comments that will be written on
the PR. See the Action README documentation for how to use this properly.
required: false
COVERAGE_DATA_BRANCH:
description: >
Name of the branch in which coverage data will be stored on the repository.
Default is 'python-coverage-comment-action-data'. Please make sure that this
branch is not protected.
default: python-coverage-comment-action-data
required: false
COMMENT_ARTIFACT_NAME:
description: >
Name of the artifact in which the body of the comment to post on the PR is stored.
default: python-coverage-comment-action
required: false
COMMENT_FILENAME:
description: >
Name of the file in which the body of the comment to post on the PR is stored.
default: python-coverage-comment-action.txt
required: false
MINIMUM_GREEN:
description: >
If the coverage percentage is above or equal to this value, the badge
will be green.
default: 100
required: false
MINIMUM_ORANGE:
description: >
If the coverage percentage is not green and above or equal to this value,
the badge will be orange. Otherwise it will be red.
default: 70
required: false
MERGE_COVERAGE_FILES:
description: >
If true, will run `coverage combine` before reading the `.coverage` file.
default: false
VERBOSE:
description: >
If true, produces more output. Useful for debugging.
default: false
outputs:
COMMENT_FILE_WRITTEN:
description: >
If "true", a comment file was written to COMMENT_FILENAME. If "false",
no comment file was written (because the comment was already posted).
runs:
using: docker
image: Dockerfile
env:
GITHUB_TOKEN: ${{ inputs.GITHUB_TOKEN }}
GITHUB_PR_RUN_ID: ${{ inputs.GITHUB_PR_RUN_ID }}
COMMENT_TEMPLATE: ${{ inputs.COMMENT_TEMPLATE }}
COVERAGE_DATA_BRANCH: ${{ inputs.COVERAGE_DATA_BRANCH }}
COMMENT_ARTIFACT_NAME: ${{ inputs.COMMENT_ARTIFACT_NAME }}
COMMENT_FILENAME: ${{ inputs.COMMENT_FILENAME }}
MINIMUM_GREEN: ${{ inputs.MINIMUM_GREEN }}
MINIMUM_ORANGE: ${{ inputs.MINIMUM_ORANGE }}
MERGE_COVERAGE_FILES: ${{ inputs.MERGE_COVERAGE_FILES }}
VERBOSE: ${{ inputs.VERBOSE }}