forked from gwatts/go-coverage-action
-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yml
84 lines (83 loc) · 3.24 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
name: 'Go Coverage'
description: 'Generates Go coverage reports without third party services'
inputs:
token:
description: github token
default: ${{ github.token }}
report-url:
description: URL of final uploaded report. e.g. https://reports.example.com/{{ $github.sha }}/cover.html
required: false
working-directory:
description: 'Working directory. Defaults to project root'
required: false
default: ''
report-filename:
description: 'File or pathname for the resulting html coverage report'
required: false
default: 'go-coverage.html'
cover-mode:
description: 'Parameter to pass to go tests -covermode argument. Either count, set or atomic'
default: 'count'
cover-pkg:
description: 'Parameter to pass to go tests -coverpkg argument. Leave empty to omit flag'
default: ''
test-args:
description: 'Additional build arguments to pass to go test'
default: '[]'
required: false
test-pkgs:
description: 'Package names to test, passed to go test - Multiple arguments should be separated by newlines'
default: './...'
required: false
coverage-threshold:
description: 'Fail the build if the coverage drops below supplied percentage'
required: false
default: 0
fail-coverage:
description: 'Fail the build if coverage drops below coverage-threshold. One of "always", "never" or "only_pull_requests"'
required: false
default: only_pull_requests
add-comment:
description: 'Adds a comment to the PR with coverage information if true. If false will only add an action summary report'
required: false
default: true
ignore-pattern:
description: 'One or more regular expressions matching filenames to exclude from coverage statistics (e.g. for generated Go files)'
required: false
default: ''
notes-ref:
description: 'The refname to use for the git notes. Defaults to gocoverage'
required: false
default: gocoverage
outputs:
report-pathname:
description: 'The full pathname of the generated coverage report'
gocov-pathname:
description: 'The full pathname of the raw .cov coverage data'
gocov-agg-pathname:
description: 'The full pathname of the aggregated .cov coverage data'
coverage-pct:
description: 'The coverage figure for the whole project. e.g "83.478"'
coverage-pct-0dp:
description: 'The coverage figure for the whole project rounded to the nearest integer. e.g "83"'
coverage-pct-1dp:
description: 'The coverage figure for the whole project rounded to 1 decimal place. e.g "83.5"'
meets-threshold:
description: 'Set to true if the current coverage is greater than coverage-threshold'
coverage-last-pct:
description: 'The prior coverage percentage'
coverage-last-pct-0dp:
description: 'The prior coverage percentage rounded to the nearest integer'
coverage-last-pct-1dp:
description: 'The prior coverage percentage rounded to 1 decimal place'
coverage-last-sha:
description: 'Commit sha prior coverage was recorded at'
coverage-delta:
description: 'Amount coverage has changed'
package-count:
description: 'Number of Go packages scanned'
uncovered-packages:
description: 'Number of Go packages with no test coverage'
runs:
using: 'node20'
main: 'dist/index.js'