-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaction.yml
More file actions
65 lines (61 loc) · 2.35 KB
/
action.yml
File metadata and controls
65 lines (61 loc) · 2.35 KB
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
name: "Coverage"
description: "Parse LCOV (Bun, Node.js, Jest, etc.) and Go coverage, compute per-file deltas, and post a sticky PR comment with monospace coverage output."
author: "xseman"
branding:
icon: "bar-chart-2"
color: "green"
inputs:
coverage-artifact-paths:
description: >
Newline- or comma-separated list of coverage artifact paths.
Each entry is `<tool>:<path>`, e.g. `bun:coverage/lcov.info`, `node:coverage/lcov.info`, or `go:coverage.out`.
required: true
pull-request-number:
description: >
PR number to comment on. Auto-detected from event context
when omitted. Use this when running under workflow_run
with fork PRs where auto-detection may fail.
required: false
default: ""
show-commit-link:
description: "Include a commit link at the top of the comment (on/off)."
required: false
default: "on"
base-branch:
description: "Target branch for comparison (e.g. main). Defaults to the PR base ref."
required: false
default: ""
cache-key:
description: "Custom cache key prefix for storing coverage artifacts."
required: false
default: "coverage-reporter"
update-comment-marker:
description: "Unique marker string to identify the sticky comment."
required: false
default: "<!-- coverage-reporter-sticky -->"
colorize:
description: "Enable colorized delta markers in the comment (on/off)."
required: false
default: "on"
fail-on-decrease:
description: "Fail the action if any file coverage decreases (true/false)."
required: false
default: "false"
coverage-threshold:
description: "Minimum overall coverage percentage. Fail if below this (0-100). Set 0 to disable."
required: false
default: "0"
github-token:
description: "GitHub token for posting PR comments. Defaults to GITHUB_TOKEN."
required: false
default: ${{ github.token }}
outputs:
overall-coverage:
description: "Overall coverage percentage across all tools."
coverage-decreased:
description: "'true' if any file had a coverage decrease."
comment-id:
description: "ID of the created/updated PR comment."
runs:
using: "node20"
main: "lib/index.js"