-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathaction.yml
157 lines (135 loc) · 4.45 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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
name: 'test-reporter'
description: 'https://github.com/dorny/test-reporter'
inputs:
artifact:
description: >
Name or regex of artifact containing test results.
Regular expression must be enclosed in '/'.
Values from captured groups will replace occurrences of $N in report name.
Example:
artifact: /test-results-(.*)/
name: 'Test report $1'
-> Artifact 'test-result-ubuntu' would create report 'Test report ubuntu'
required: false
default: ''
name:
description: >
Name of the Check Run which will be created
required: false
default: ''
path:
description: >
Comma-separated list of paths to test results
Supports wildcards via [fast-glob](https://github.com/mrmlnc/fast-glob)
All matched result files must be of the same format
required: false
default: ''
path-replace-backslashes:
description: >
The fast-glob library that is internally used interprets backslashes as escape characters.
If enabled, all backslashes in provided path will be replaced by forward slashes and act as directory separators.
It might be useful when path input variable is composed dynamically from existing directory paths on Windows.
required: false
default: 'false'
reporter:
description: >
Format of test results. Supported options:
dart-json
dotnet-trx
flutter-json
java-junit (default)
jest-junit
mocha-json
required: false
default: 'java-junit'
only-summary:
description: >
Allows you to generate only the summary.
If enabled, the report will contain a table listing each test results file and the number of passed, failed, and skipped tests.
Detailed listing of test suites and test cases will be skipped.
required: false
default: 'false'
list-suites:
description: >
Limits which test suites are listed:
all
failed
required: false
default: 'all'
list-tests:
description: >
Limits which test cases are listed:
all
failed
none
required: false
default: 'all'
max-annotations:
description: >
Limits number of created annotations with error message and stack trace captured during test execution.
Must be less or equal to 50.
required: false
default: '10'
fail-on-error:
description: >
Set action as failed if test report contains any failed test
required: false
default: 'true'
fail-on-empty:
description: >
Set this action as failed if no test results were found
required: false
default: 'true'
working-directory:
description: >
Relative path under $GITHUB_WORKSPACE where the repository was checked out.
required: false
default: ''
token:
description: >
Personal access token used to interact with Github API
Default: github.token
required: false
default: ${{ github.token }}
outputs:
conclusion:
description: "Success or failure"
value: ${{ steps.generate_test_report.outputs.conclusion }}
passed:
description: "Count of passed tests"
value: ${{ steps.generate_test_report.outputs.passed }}
failed:
description: "Count of failed tests"
value: ${{ steps.generate_test_report.outputs.failed }}
skipped:
description: "Count of skipped tests"
value: ${{ steps.generate_test_report.outputs.skipped }}
time:
description: "Test execution time [ms]"
value: ${{ steps.generate_test_report.outputs.time }}
url:
description: "Check run URL"
value: ${{ steps.generate_test_report.outputs.url }}
url_html:
description: "Check run URL HTML"
value: ${{ steps.generate_test_report.outputs.url_html }}
runs:
using: composite
steps:
- name: Generate Test Report
id: generate_test_report
uses: dorny/test-reporter@v1
with:
artifact: ${{ inputs.artifact }}
name: ${{ inputs.name }}
path: ${{ inputs.path }}
path-replace-backslashes: ${{ inputs.path-replace-backslashes }}
reporter: ${{ inputs.reporter }}
only-summary: ${{ inputs.only-summary }}
list-suites: ${{ inputs.list-suites }}
list-tests: ${{ inputs.list-tests }}
max-annotations: ${{ inputs.max-annotations }}
fail-on-error: ${{ inputs.fail-on-error }}
fail-on-empty: ${{ inputs.fail-on-empty }}
working-directory: ${{ inputs.working-directory }}
token: ${{ inputs.token }}