Skip to content

Commit

Permalink
parse root action input
Browse files Browse the repository at this point in the history
  • Loading branch information
threeal committed Jan 26, 2023
1 parent 7972aa1 commit 2816299
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
7 changes: 6 additions & 1 deletion dist/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/index.js.map

Large diffs are not rendered by default.

8 changes: 7 additions & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,14 @@ async function run(): Promise<void> {
await exec.exec("pip3 install gcovr");
core.endGroup();

let args: string[] = [];
const root: string = core.getInput("root");
if (root) {
args = args.concat(["--root", root]);
}

core.startGroup("Generate code coverage report using gcovr");
await exec.exec("gcovr");
await exec.exec("gcovr", args);
core.endGroup();
} catch (error) {
if (error instanceof Error) core.setFailed(error.message);
Expand Down

0 comments on commit 2816299

Please sign in to comment.