diff --git a/.codecov.yml b/.codecov.yml new file mode 100644 index 00000000..2dcdcb86 --- /dev/null +++ b/.codecov.yml @@ -0,0 +1,2 @@ +fixes: + - "ros_ws/src/sros2/::" diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 00000000..4b0d2355 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,61 @@ +name: SROS2 CI +on: + pull_request: + push: + schedule: + # Run daily + - cron: '0 20 * * *' + +jobs: + test_latest: + runs-on: ubuntu-latest + container: osrf/ros2:devel + steps: + - run: | + apt-get -qq update + apt-get -qq upgrade -y + apt-get -qq install -y curl libasio-dev libtinyxml2-dev + # TODO(mikaelarguedas) switch back to ros-tooling/action-ros-ci once + # https://github.com/ros-tooling/action-ros-ci/pull/109 is released + - uses: mikaelarguedas/action-ros-ci@sros2-version + with: + package-name: | + sros2 + sros2_cmake + # skipping end-to-end tests for now https://github.com/eProsima/Fast-RTPS/issues/1087 + # test_security + # extra-cmake-args: '-DSECURITY=ON --no-warn-unused-cli' + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v1.0.6 + if: github.event_name == 'pull_request' || (github.event_name == 'push' && github.ref == 'refs/heads/master') + with: + file: ros_ws/build/sros2/coverage.xml + flags: unittests + name: sros2-coverage + fail_ci_if_error: true + yml: .codecov.yml + - name: Upload Logs + uses: actions/upload-artifact@v1 + if: failure() + with: + name: colcon-logs + path: ros_ws/log + test_nightly: + runs-on: ubuntu-latest + container: osrf/ros2:nightly + steps: + - uses: actions/checkout@v1 + - run: | + apt-get -qq update + apt-get -qq upgrade -y + rosdep update + rosdep install -y --from-paths . --ignore-src --rosdistro $ROS_DISTRO + - run: . /opt/ros/$ROS_DISTRO/setup.sh && colcon build + - run: . /opt/ros/$ROS_DISTRO/setup.sh && colcon test --executor sequential --event-handlers console_direct+ + - run: colcon test-result + - name: Upload Logs + uses: actions/upload-artifact@v1 + if: failure() + with: + name: colcon-logs + path: ros_ws/log diff --git a/README.md b/README.md index 97b99dcf..0853a646 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,8 @@ # Context +![SROS2 CI](https://github.com/ros2/sros2/workflows/SROS2%20CI/badge.svg) +[![codecov](https://codecov.io/gh/ros2/sros2/branch/master/graph/badge.svg)](https://codecov.io/gh/ros2/sros2) + This package provides the tools and instructions to use ROS2 on top of DDS-Security. The security feature is tested across platforms (Linux, macOS, and Windows) as well as across different languages (C++ and Python). diff --git a/sros2/.coveragerc b/sros2/.coveragerc new file mode 100644 index 00000000..c07be3ca --- /dev/null +++ b/sros2/.coveragerc @@ -0,0 +1,4 @@ +[run] +omit = + # omit test directory + test/*