generated from im-open/javascript-action-template
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathaction.yml
80 lines (77 loc) · 4.2 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: process-code-coverage-summary
description: GitHub Action that can create a status check or PR comment based on the provided results summary file.
inputs:
github-token:
description: 'Token used to interact with the repository. Generally `secrets.GITHUB_TOKEN.`'
required: true
summary-file:
description: 'The summary file generated by the report-generator action.'
required: true
report-name:
description: 'The desired name of the report that is shown on the PR Comment and inside the Status Check.'
required: true
default: Code Coverage Results
create-status-check:
description: 'Flag indicating whether a status check with code coverage results should be generated.'
required: true
default: 'true'
check-name:
description: |
The desired name of the status check.
*Only applicable when `create-status-check` is true.*
required: true
default: code coverage
create-pr-comment:
description: 'Flag indicating whether a PR comment with code coverage results should be generated. When `true` the default behavior is to update an existing comment if one exists.'
required: true
default: 'true'
update-comment-if-one-exists:
description: |
This flag determines whether a new comment is created or if the action updates an existing comment (*if one is found*).
*Only applicable when `create-pr-comment` is true.*
required: true
default: 'true'
update-comment-key:
description: |
A unique identifier which will be added to the generated markdown as a comment (*it will not be visible in the PR comment*).
This identifier enables creating then updating separate results comments on the PR if more than one instance of this action is included in a single job.
This can be helpful when there are multiple coverage projects that run separately but are part of the same job.
Each instance of the action should have a different key and this value should be static so it remains the same each time the workflow is run.
Defaults to GITHUB_JOB_GITHUB_ACTION if not provided.
*Only applicable when `create-pr-comment` and `update-comment-if-one-exists` are `true`.*
required: false
ignore-threshold-failures:
description: |
If the coverage falls below the threshold and this is set to `true` the status check's conclusion will be set to `neutral`
and the `coverage-outcome` output will be set to `Passed`.
This is useful if you want coverage reported but do not want a failing status check to block pull requests.
required: false
default: 'false'
line-threshold:
description: |
Minimum threshold for line coverage.
The status check conclusion will be `failure `and `coverage-outcome` will be `Failed` if the actual coverage amount is less than this.
Set to `0` to disable line coverage checks. When `0`, the status check will always be `neutral` and the `coverage-outcome` will be `Passed`.
required: false
default: '0'
branch-threshold:
description: |
Minimum threshold for branch coverage.
The status check conclusion will be `failure `and `coverage-outcome` will be `Failed` if the actual coverage amount is less than this.
Set to 0 if you do not want thresholds to be applied.
required: false
default: '0'
outputs:
coverage-outcome:
description: 'Coverage outcome based on Threshold comparisons: Failed|Passed. If exceptions are thrown or if it exits early because of argument errors, this is set to Failed.'
coverage-results-truncated:
description: 'Flag indicating whether coverage results were truncated due to markdown exceeding character limit of 65535.'
coverage-results-file-path:
description: 'File path for the file that contains the coverage results in markdown format. This is the same output that is posted in the PR comment.'
status-check-id:
description: 'The ID of the Status Check that was created. This is only set if `create-status-check` is `true` and a status check was created successfully.'
pr-comment-id:
description: 'The ID of the PR comment that was created. This is only set if `create-pr-comment` is `true` and a PR was created successfully.'
runs:
using: 'node20'
main: 'dist/index.js'