-
Notifications
You must be signed in to change notification settings - Fork 47
86 lines (84 loc) · 2.86 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
name: SROS2 CI
on:
pull_request:
push:
branches:
rolling
schedule:
# Run daily
- cron: '0 20 * * *'
jobs:
test_latest:
runs-on: ubuntu-latest
# 'osrf/ros2:devel' does *not* include RTI Connext or its' security plugins
# the former gets installed via rosdep in 'action-ros-ci' but the latter do *not* get installed
container: osrf/ros2:devel
steps:
- name: Install prerequisites for action-ros-ci and FastRTPS
run: |
apt-get -qq update
apt-get -qq upgrade -y
apt-get -qq install -y curl libasio-dev libssl-dev libtinyxml2-dev python3-colcon-coveragepy-result
- uses: ros-tooling/[email protected]
with:
rosdep-skip-keys: rti-connext-dds-6.0.1
package-name: |
sros2
sros2_cmake
test_security
extra-cmake-args: '-DSECURITY=ON --no-warn-unused-cli'
colcon-defaults: |
{
"build": {
"mixin": ["coverage-pytest"]
},
"test": {
"mixin": ["coverage-pytest"]
}
}
colcon-mixin-repository: https://raw.githubusercontent.com/colcon/colcon-mixin-repository/master/index.yaml
target-ros2-distro: rolling
vcs-repo-file-url: https://raw.githubusercontent.com/ros2/ros2/rolling/ros2.repos
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
if: github.event_name == 'pull_request' || (github.event_name == 'push' && github.ref == 'refs/heads/rolling')
with:
file: ros_ws/build/sros2/coverage.xml
flags: unittests
name: sros2-coverage
fail_ci_if_error: true
codecov_yml_path: codecov.yml
- name: Upload Logs
uses: actions/upload-artifact@v4
if: failure()
with:
name: colcon-logs
path: ros_ws/log
test_nightly:
runs-on: ubuntu-latest
# 'osrf/ros2:nightly-rmw-nonfree' includes RTI Connext but
# does *not* include the security plugins or a license allowing the use of Security
container: osrf/ros2:nightly-rmw-nonfree
steps:
- uses: actions/checkout@v4
- name: Installing dependencies
run: |
apt-get -qq update
apt-get -qq upgrade -y
. /opt/ros/$ROS_DISTRO/setup.sh
rosdep update
DEBIAN_FRONTEND=noninteractive rosdep install -y --from-paths . --ignore-src --rosdistro $ROS_DISTRO
- name: Build workspace
run: . /opt/ros/$ROS_DISTRO/setup.sh && colcon build
- name: Test workspace
run: . /opt/ros/$ROS_DISTRO/setup.sh && colcon test --executor sequential --event-handlers console_direct+
- name: Check test results
run: colcon test-result
- name: Upload Logs
uses: actions/upload-artifact@v4
if: failure()
with:
name: colcon-logs
path: ros_ws/log