-
Notifications
You must be signed in to change notification settings - Fork 1
70 lines (60 loc) · 2.29 KB
/
devel.yaml
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
name: devel
on:
pull_request:
branches:
- devel
push:
branches:
- devel
jobs:
test_docker:
runs-on: ubuntu-latest
strategy:
matrix:
ros_distribution:
- noetic
include:
- docker_image: ubuntu:focal
ros_distribution: noetic
ros_version: 1
container:
image: ${{ matrix.docker_image }}
steps:
- name: setup ROS environment
uses: ros-tooling/[email protected]
with:
required-ros-distributions: ${{ matrix.ros_distribution }}
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y wget python3-vcstool python3-pytest libfl-dev pip python3-rosdep python3-catkin-tools build-essential
sudo pip install unified-planning unified-planning[engines]
- name: Prepare the catkin ws
id: prepare-catkin-ws
run: |
mkdir -p catkin_ws/src
cd catkin_ws
catkin_ws=$(pwd)
bash -c "source /opt/ros/noetic/setup.bash && catkin config --install --cmake-args -DCMAKE_BUILD_TYPE=Debug"
echo "catkin_ws=$catkin_ws" >> $GITHUB_OUTPUT
- name: Checkout code
uses: actions/checkout@v2
with:
path: ${{steps.prepare-catkin-ws.outputs.catkin_ws}}/src
- name: Running tests and generating the code coverage report
id: test-and-coverage
run: |
rosdep update
rosdep install --from-paths ${{steps.prepare-catkin-ws.outputs.catkin_ws}}/src/ --ignore-src --rosdistro=${{ matrix.ros_distribution }} -y
cd ${{steps.prepare-catkin-ws.outputs.catkin_ws}}
bash -c "source /opt/ros/noetic/setup.bash && catkin build up_msgs up4ros --no-status --no-notify"
cd ${{steps.prepare-catkin-ws.outputs.catkin_ws}}/src
bash -c "source ${{steps.prepare-catkin-ws.outputs.catkin_ws}}/install/setup.bash && python3 -m pytest --cov=up4ros --cov-report=xml"
coverage_file=$(pwd)/coverage.xml
echo "coverage_file=$coverage_file" >> $GITHUB_OUTPUT
- uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: unittests
files: ${{steps.test-and-coverage.outputs.coverage_file}}
fail_ci_if_error: false