Skip to content

Commit

Permalink
Add flags to generate Python code coverage (#25)
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Moulard <tmoulard@amazon.com>
  • Loading branch information
Thomas Moulard authored Nov 5, 2019
1 parent 4f4522c commit ce49db6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion lib/action-ros2-ci.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ EOF`], options);
}
yield exec.exec("colcon", ["build", "--event-handlers", "console_cohesion+", "--packages-up-to",
packageName, "--symlink-install"].concat(extra_options), options);
yield exec.exec("colcon", ["test", "--event-handlers", "console_cohesion+", "--packages-select",
yield exec.exec("colcon", ["test", "--event-handlers", "console_cohesion+", "--pytest-args",
"'--cov=.'", "'--cov-report=xml'", "--packages-select",
packageName, "--return-code-on-test-failure"].concat(extra_options), options);
}
catch (error) {
Expand Down
6 changes: 4 additions & 2 deletions src/action-ros2-ci.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,10 @@ EOF`], options);
packageName, "--symlink-install"].concat(extra_options), options);
await exec.exec(
"colcon",
["test", "--event-handlers", "console_cohesion+", "--packages-select",
packageName, "--return-code-on-test-failure"].concat(extra_options), options);
["test", "--event-handlers", "console_cohesion+", "--pytest-args",
"'--cov=.'", "'--cov-report=xml'", "--packages-select",
packageName, "--return-code-on-test-failure"].concat(extra_options),
options);
} catch (error) {
core.setFailed(error.message);
}
Expand Down

0 comments on commit ce49db6

Please sign in to comment.