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
|
DISTRO: foxy
|
||||||
ROS2TRACING_BRANCH: master
|
ROS2TRACING_BRANCH: master
|
||||||
|
|
||||||
|
stages:
|
||||||
|
- build_test
|
||||||
|
- report
|
||||||
|
|
||||||
.global_artifacts: &global_artifacts
|
.global_artifacts: &global_artifacts
|
||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
|
@ -16,14 +20,28 @@ variables:
|
||||||
- build/*/test_results/*/*.xunit.xml
|
- build/*/test_results/*/*.xunit.xml
|
||||||
- build/*/pytest.xml
|
- build/*/pytest.xml
|
||||||
|
|
||||||
build:
|
|
||||||
image: $BASE_IMAGE_ID:$DISTRO
|
|
||||||
before_script:
|
before_script:
|
||||||
- . /root/ws/install/local_setup.sh
|
- . /root/ws/install/local_setup.sh
|
||||||
script:
|
|
||||||
- python3 get_branch.py --check
|
- python3 get_branch.py --check
|
||||||
- git clone https://gitlab.com/micro-ROS/ros_tracing/ros2_tracing.git --branch $(python3 get_branch.py)
|
- 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
|
||||||
|
script:
|
||||||
- colcon build --symlink-install --event-handlers console_cohesion+ --packages-up-to $PACKAGES_LIST
|
- 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 --event-handlers console_cohesion+ --packages-select $PACKAGES_LIST
|
||||||
- colcon test-result --all
|
- colcon test-result --all
|
||||||
<<: *global_artifacts
|
<<: *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
|
||||||
|
|
4
ros2trace_analysis/.coveragerc
Normal file
4
ros2trace_analysis/.coveragerc
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
[run]
|
||||||
|
omit =
|
||||||
|
setup.py
|
||||||
|
test/*
|
4
tracetools_analysis/.coveragerc
Normal file
4
tracetools_analysis/.coveragerc
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
[run]
|
||||||
|
omit =
|
||||||
|
setup.py
|
||||||
|
test/*
|
Loading…
Add table
Add a link
Reference in a new issue