File tree Expand file tree Collapse file tree 1 file changed +18
-5
lines changed Expand file tree Collapse file tree 1 file changed +18
-5
lines changed Original file line number Diff line number Diff line change 4
4
image : robotics/ci-ubuntu20:latest
5
5
flavor : i1.large
6
6
commands :
7
- - source /opt/ros/noetic/setup.bash && echo "ROS_DISTRO == $ROS_DISTRO" &&
8
- cd .. && mkdir -p catkin_ws/src && cp -r ./ROS-TCP-Endpoint catkin_ws/src &&
9
- cd catkin_ws && catkin_make && source devel/setup.bash && python3 -m pytest
7
+ # run unit tests and save test results in /home/bokken/build/output/Unity-Technologies/ROS-TCP-Endpoint
8
+ - command : |
9
+ source /opt/ros/noetic/setup.bash && echo "ROS_DISTRO == $ROS_DISTRO"
10
+ cd .. && mkdir -p catkin_ws/src && cp -r ./ROS-TCP-Endpoint catkin_ws/src
11
+ cd catkin_ws && catkin_make && source devel/setup.bash
12
+ cd src/ROS-TCP-Endpoint
13
+ python3 -m pytest --cov=. --cov-report xml:../../../ROS-TCP-Endpoint/test-results/coverage.xml --cov-report html:../../../ROS-TCP-Endpoint/test-results/coverage.html test/
14
+ # check the test coverage
15
+ - command : |
16
+ linecoverage=$(head -2 test-results/coverage.xml | grep -Eo 'line-rate="[0-9]+([.][0-9]+)?"' | grep -Eo "[0-9]+([.][0-9]+)?")
17
+ echo "Line coverage: $linecoverage"
18
+ if [[ $linecoverage < 0 ]]; then exit 1; fi
10
19
triggers :
11
20
cancel_old_ci : true
12
21
expression : |
13
22
(pull_request.target eq "main" AND
14
23
NOT pull_request.push.changes.all match "**/*.md") OR
15
- (push.branch eq "dev" AND
16
- NOT push.changes.all match "**/*.md")
24
+ (pull_request.target eq "dev" AND
25
+ NOT pull_request.push.changes.all match "**/*.md")
26
+ artifacts :
27
+ logs :
28
+ paths :
29
+ - " test-results/**/*"
You can’t perform that action at this time.
0 commit comments