ros-tooling/action-ros-ci

Split build and test steps

audrow opened this issue · 0 comments

Description

Currently it's only possible to build and test in the same action step. It'd be nice to have a build step and then a test step, so that it's easier to see at a glance if building failed or if testing failed. This is especially useful for a project that has common flaky tests, because a build failure is a problem but a test failure may not be as concerning.

Completion Criteria

Separate steps for building and testing a repo.

Implementation Notes / Suggestions

This logic would have to be split up between two functions.

let colconBuildCmd = [
`colcon`,
`build`,
`--symlink-install`,
...buildPackageSelection,
...colconExtraArgs,
...extraCmakeArgs,
`--event-handlers=console_cohesion+`,
];
if (useMergeInstall) {
colconBuildCmd = [...colconBuildCmd, `--merge-install`];
}
await execShellCommand(
[...colconCommandPrefix, ...colconBuildCmd],
options,
false
);
if (!skipTests) {
await runTests(
colconCommandPrefix,
options,
testPackageSelection,
colconExtraArgs,
coverageIgnorePattern
);
} else {
core.info("Skipping tests");
}