Add coverage CI job and upload results to codecov.io
Signed-off-by: Christophe Bedard <bedard.christophe@gmail.com>
This commit is contained in:
parent
5e845fe196
commit
df65eebfca
3 changed files with 30 additions and 4 deletions
|
@ -5,6 +5,10 @@ variables:
|
|||
DISTRO: foxy
|
||||
ROS2TRACING_BRANCH: master
|
||||
|
||||
stages:
|
||||
- build_test
|
||||
- report
|
||||
|
||||
.global_artifacts: &global_artifacts
|
||||
artifacts:
|
||||
paths:
|
||||
|
@ -16,14 +20,28 @@ variables:
|
|||
- build/*/test_results/*/*.xunit.xml
|
||||
- build/*/pytest.xml
|
||||
|
||||
before_script:
|
||||
- . /root/ws/install/local_setup.sh
|
||||
- python3 get_branch.py --check
|
||||
- git clone https://gitlab.com/micro-ROS/ros_tracing/ros2_tracing.git --branch $(python3 get_branch.py)
|
||||
|
||||
build:
|
||||
stage: build_test
|
||||
image: $BASE_IMAGE_ID:$DISTRO
|
||||
before_script:
|
||||
- . /root/ws/install/local_setup.sh
|
||||
script:
|
||||
- python3 get_branch.py --check
|
||||
- git clone https://gitlab.com/micro-ROS/ros_tracing/ros2_tracing.git --branch $(python3 get_branch.py)
|
||||
- colcon build --symlink-install --event-handlers console_cohesion+ --packages-up-to $PACKAGES_LIST
|
||||
- colcon test --event-handlers console_cohesion+ --packages-select $PACKAGES_LIST
|
||||
- colcon test-result --all
|
||||
<<: *global_artifacts
|
||||
|
||||
coverage:
|
||||
stage: report
|
||||
image: $BASE_IMAGE_ID:$DISTRO
|
||||
script:
|
||||
- colcon build --symlink-install --event-handlers console_cohesion+ --packages-up-to $PACKAGES_LIST --mixin coverage-pytest --cmake-args -DBUILD_TESTING=ON --no-warn-unused-cli
|
||||
- colcon test --event-handlers console_cohesion+ --packages-select $PACKAGES_LIST --mixin coverage-pytest
|
||||
- colcon test-result --all
|
||||
- bash <(curl -s https://codecov.io/bash)
|
||||
- colcon coveragepy-result --packages-select $PACKAGES_LIST --verbose --coverage-report-args -m
|
||||
allow_failure: true
|
||||
<<: *global_artifacts
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue