Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ inputs:
minimum-coverage:
description: 'The minimum coverage to pass the check. Optional. Default: `0` (always passes)'
default: 0
genhtml-ignore-errors:
description: errors genhtml should ignore. See https://man.archlinux.org/man/genhtml.1.en for more information
default:
github-token:
description: 'Set the GitHub token to have the action comment the coverage summary in the pull request. This token is provided by Actions, you do not need to create your own token. Optional. Default: ``'
working-directory:
Expand Down
14 changes: 14 additions & 0 deletions dist/main/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/main/index.js.map

Large diffs are not rendered by default.

14 changes: 14 additions & 0 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,13 @@ async function genhtml(coverageFiles, tmpPath) {
const artifactPath = path.resolve(tmpPath, 'html').trim();
const args = [...coverageFiles, '--rc', 'lcov_branch_coverage=1'];

const ignoreErrors = core.getInput('genhtml-ignore-errors', { required: false }).trim();

if (ignoreErrors != '') {
args.push('--ignore-errors');
args.push(ignoreErrors);
}

args.push('--output-directory');
args.push(artifactPath);

Expand Down Expand Up @@ -149,6 +156,13 @@ async function mergeCoverages(coverageFiles, tmpPath) {
args.push('--output-file');
args.push(mergedCoverageFile);

const ignoreErrors = core.getInput('genhtml-ignore-errors', { required: false }).trim();

if (ignoreErrors != '') {
args.push('--ignore-errors');
args.push(ignoreErrors);
}

await exec.exec('lcov', [...args, '--rc', 'lcov_branch_coverage=1']);

return mergedCoverageFile;
Expand Down
Loading