forked from MishaKav/pytest-coverage-comment
-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yml
129 lines (109 loc) · 3.81 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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
name: 'Pytest Coverage Comment'
description: 'Comments a pull request with the pytest code coverage badge and full report'
author: 'Misha Kav'
branding:
icon: 'message-circle'
color: 'blue'
inputs:
github-token:
description: 'GitHub API Access Token'
default: ${{ github.token }}
required: true
pytest-coverage-path:
description: 'The location of the txt output of pytest-coverage'
default: './pytest-coverage.txt'
required: false
issue-number:
description: 'PR number for the PR you want the comment to post to.'
default: ''
required: false
pytest-xml-coverage-path:
description: 'The location of coverage-xml from pytest-coverage'
default: ''
required: false
coverage-path-prefix:
description: 'Prefix for path when link to files in comment'
default: ''
required: false
title:
description: 'Title for the coverage report. Useful for monorepo projects'
default: 'Coverage Report'
required: false
badge-title:
description: 'Title for the badge icon'
default: 'Coverage'
required: false
hide-badge:
description: 'Hide badge with percentage'
default: 'false'
required: false
hide-report:
description: 'Hide coverage report'
default: 'false'
required: false
hide-comment:
description: 'Hide the whole comment (use when you need only `output`)'
default: 'false'
required: false
report-only-changed-files:
description: 'Show in report only changed files for this commit, and not all files'
default: 'false'
required: false
junitxml-path:
description: 'The location of the junitxml path'
default: ''
required: false
junitxml-title:
description: 'Title for summary for junitxml'
default: ''
required: false
create-new-comment:
description: 'When false, will update the same comment, otherwise will publish new comment on each run'
default: 'false'
required: false
default-branch:
description: 'This branch name is usefull when generate "coverageHtml", it points direct links to files on this branch (instead of commit). Usually "main" or "master"'
default: 'main'
required: false
multiple-files:
description: >
You can pass array of titles and files to generate single comment with table of results.
Single line should look like `Title, ./path/to/pytest-coverage.txt, ./path/to/pytest.xml`
example:
My Title 1, ./data/pytest-coverage_3.txt, ./data/pytest_1.xml
default: ''
required: false
remove-link-from-badge:
description: 'When true, it will remove the link from badge to readme'
default: 'false'
required: false
unique-id-for-comment:
description: 'When running in a matrix, pass the matrix value, so each comment will be updated its own comment'
default: ''
required: false
outputs:
coverage:
description: 'value indicating the coverage percentage of your report based on pytest, example 30%'
color:
description: 'color of coverage report'
coverageHtml:
description: 'The html of the coverage report. Html with links to files of missing lines'
summaryReport:
description: 'Markdown with summaryof: Tests/Skipped/Failures/Errors/Time'
warnings:
description: 'Number of warnings, get from pytest-cov'
tests:
description: 'Total number of tests, get from `junitxml`'
skipped:
description: 'Total number of skipped tests, get from `junitxml`'
failures:
description: 'Total number of tests with failures, get from `junitxml`'
errors:
description: 'Total number of tests with errors, get from `junitxml`'
time:
description: 'Seconds the took to run all the tests, get from `junitxml`'
notSuccessTestInfo:
description: 'Info from testcase that has failures/errors/skipped, get from `junitxml`'
runs:
using: 'node20'
main: 'dist/index.js'