Skip to content

Add CI that builds and tests the package in the Space ROS image (#21). - #22

Open
EmbryoSpace wants to merge 1 commit into
space-ros:mainfrom
EmbryoSpace:ci-colcon-test
Open

EmbryoSpace wants to merge 1 commit into
space-ros:mainfrom
EmbryoSpace:ci-colcon-test

Conversation

@EmbryoSpace

Copy link
Copy Markdown

Closes #21.

Adds two workflows:

  • ci.yml: builds with colcon in osrf/space-ros:latest (as root, so actions/checkout can write the workspace) and runs the unit tests with --return-code-on-test-failure, so a failing test fails the check. Linter tests (pytest marker linter) run in a separate step with continue-on-error, because today they cannot pass: ament_flake8/ament_pep257 crash in the image (ament_flake8 and ament_pep257 crash in the Space ROS image, so flake8 and pep257 never check anything space-ros#450), and once that is fixed the package has existing flake8 and pep257 findings. The step can be made blocking after those are cleaned up.
  • pr.yaml: the standard space-ros/check-commit-message-action, as in the other Space ROS repositories.

Testing: I replayed the workflow steps locally in osrf/space-ros:latest with bash -e. On main: build passes, unit tests pass (7 tests, 0 failures, 2 skipped), the linter step fails and is ignored. With a deliberately failing test added: the unit test step fails (exit 1). GitHub's own run on this PR will be the real check; it may need a maintainer to approve workflows for a first-time contributor.

…e-ros#21).

process_sarif has no CI, so nothing runs its tests on pull requests. Its
linter tests have been crashing in the Space ROS image without anyone
noticing.

This commit adds two workflows:

- ci.yml builds the package with colcon in osrf/space-ros:latest and runs
  the unit tests with --return-code-on-test-failure, so a failing test
  fails the check. Linter tests (pytest marker "linter") run in a separate,
  non-blocking step: today they cannot pass, because ament_flake8 and
  ament_pep257 crash with the flake8/pydocstyle shipped in the image, and
  the package has existing flake8 and pep257 findings.
- pr.yaml runs space-ros/check-commit-message-action, as the other Space ROS
  repositories do.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add CI that builds and tests the package

1 participant