8
8
required : false
9
9
default : ${{ github.token }}
10
10
path-to-lcov :
11
- description : ' Path to lcov file'
11
+ description : ' Path to lcov file [DEPRECATED]'
12
+ required : false
13
+ file :
14
+ description : ' Coverage file'
12
15
required : false
13
- default : ' ./coverage/lcov.info'
14
16
flag-name :
15
17
description : ' Job flag name, e.g. "Unit", "Functional", or "Integration". Will be shown in the Coveralls UI.'
16
18
required : false
@@ -36,12 +38,67 @@ inputs:
36
38
git-commit :
37
39
description : ' Override the commit sha'
38
40
required : false
41
+ debug :
42
+ description : ' Enable debug output'
43
+ required : false
44
+ default : false
39
45
outputs :
40
46
coveralls-api-result :
41
47
description : ' Result status of Coveralls API post.'
42
48
branding :
43
49
color : ' green'
44
50
icon : ' percent'
45
51
runs :
46
- using : ' node16'
47
- main : ' ./dist/index.js'
52
+ using : ' composite'
53
+ steps :
54
+ - name : Install coveralls reporter (macOS)
55
+ if : runner.os == 'macOS'
56
+ shell : bash
57
+ run : |
58
+ brew tap coverallsapp/coveralls --quiet
59
+ brew install coveralls --quiet
60
+
61
+ - name : Install coveralls reporter (Linux)
62
+ if : runner.os == 'Linux'
63
+ shell : bash
64
+ run : curl -sL https://github.com/coverallsapp/coverage-reporter/releases/latest/download/coveralls-linux.tar.gz | tar xz -C /usr/local/bin
65
+
66
+ - name : Install coveralls reporter (Windows)
67
+ if : startsWith(runner.os, 'Windows')
68
+ shell : bash
69
+ run : |
70
+ mkdir -p ~/bin/
71
+ curl -sL https://github.com/coverallsapp/coverage-reporter/releases/latest/download/coveralls-windows.zip | zcat > ~/bin/coveralls.exe
72
+ echo ~/bin >> $GITHUB_PATH
73
+
74
+ - name : Done report
75
+ if : inputs.parallel-finished == 'true'
76
+ shell : bash
77
+ run : coveralls --done ${{ inputs.debug == 'true' && '--debug' || '' }}
78
+ env :
79
+ COVERALLS_DEBUG : ${{ inputs.debug }}
80
+ COVERALLS_CARRYFORWARD_FLAGS : ${{ inputs.carryforward }}
81
+ COVERALLS_FLAG_NAME : ${{ inputs.flag-name }}
82
+ COVERALLS_PARALLEL : ${{ inputs.parallel }}
83
+ COVERALLS_ENDPOINT : ${{ inputs.coveralls-endpoint }}
84
+ COVERALLS_GIT_BRANCH : ${{ inputs.git-branch }}
85
+ COVERALLS_GIT_COMMIT : ${{ inputs.git-commit }}
86
+ COVERALLS_REPO_TOKEN : ${{ inputs.github-token }}
87
+
88
+ - name : Coverage report
89
+ if : inputs.parallel-finished != 'true'
90
+ shell : bash
91
+ run : >-
92
+ coveralls
93
+ ${{ inputs.debug == 'true' && '--debug' || '' }}
94
+ ${{ inputs.base-path && format('--base-path {0}', inputs.base-path) || '' }}
95
+ ${{ (inputs.file || inputs.path-to-lcov) && format('--file {0}', inputs.file || inputs.path-to-lcov) || '' }}
96
+ env :
97
+ COVERALLS_DEBUG : ${{ inputs.debug }}
98
+ COVERALLS_CARRYFORWARD_FLAGS : ${{ inputs.carryforward }}
99
+ COVERALLS_FLAG_NAME : ${{ inputs.flag-name }}
100
+ COVERALLS_PARALLEL : ${{ inputs.parallel }}
101
+ COVERALLS_ENDPOINT : ${{ inputs.coveralls-endpoint }}
102
+ COVERALLS_GIT_BRANCH : ${{ inputs.git-branch }}
103
+ COVERALLS_GIT_COMMIT : ${{ inputs.git-commit }}
104
+ COVERALLS_REPO_TOKEN : ${{ inputs.github-token }}
0 commit comments