Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow disabling generation of HTML reports #232

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
4 changes: 4 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ inputs:
required: true
artifact-name:
description: 'The GitHub artifact name of the generated HTML report. For example, `code-coverage-report`. _Note:_ When downloading, it will be extracted in an `html` directory. Optional. Default: `` (Skips uploading of artifacts)'
generate-html-report:
description: 'Set to `false` to skip generating the HTML report entirely. Optional. Default: `true`'
required: false
default: "true"
minimum-coverage:
description: 'The minimum coverage to pass the check. Optional. Default: `0` (always passes)'
default: 0
Expand Down
5 changes: 4 additions & 1 deletion src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ async function run() {
const additionalMessage = core.getInput('additional-message');
const updateComment = core.getInput('update-comment') === 'true';

await genhtml(coverageFiles, tmpPath);
const genHtmlReport = core.getInput('generate-html-report') === 'true';
if (genHtmlReport) {
await genhtml(coverageFiles, tmpPath);
}

const coverageFile = await mergeCoverages(coverageFiles, tmpPath);
const totalCoverage = lcovTotal(coverageFile);
Expand Down