Skip to content

Commit

Permalink
add rosbag2_processing_service to gha
Browse files Browse the repository at this point in the history
  • Loading branch information
SaikrishnaBairamoni authored Feb 15, 2024
1 parent 13eabb8 commit baa74c7
Showing 1 changed file with 44 additions and 2 deletions.
46 changes: 44 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,48 @@ jobs:
name: web-app-server
path: telematic_system/telematic_apps/web_app/server/coverage/*
if-no-files-found: error
rosbag2_processing_service_coverage:
runs-on: ubuntu-latest
container:
image: ros:foxy
options: --user root
steps:
- name: Checkout ${{ github.event.repository.name }}
uses: actions/checkout@v3
- name: Load Environment Variables
shell: bash
run: |
while read -r line; do export "$line"; done < $GITHUB_WORKSPACE/telematic_system/historical_data_processing/rosbag2_processing_service/.env
- name: Install dependencies and build
shell: bash
run: |
apt-get update
apt-get -y install python3-coverage python3-pip python3-pytest python3-pytest-asyncio ros-foxy-rclpy unzip
python3 -m pip install nats-py influxdb influxdb_client mcap-ros2-support pathlib
apt install -y apt-utils python3-pybind11 ros-foxy-test-msgs python3-colcon-common-extensions
cd $GITHUB_WORKSPACE/telematic_system/historical_data_processing/rosbag2_processing_service
source /opt/ros/foxy/setup.bash
colcon build --packages-up-to rosbag2_processing_service
- name: Run tests
shell: bash
run: |
export PYTHONPATH=$PYTHONPATH:/usr/lib/python3/dist-packages
cd $GITHUB_WORKSPACE/telematic_system/historical_data_processing/rosbag2_processing_service/test/
python3 -m coverage run -m pytest
python3 -m coverage xml --omit="/opt/*,/root/*,/tmp/*,/usr/*,/var/*,**/__init__.py"
- name: Find coverage.xml
shell: bash
run: |
find "$GITHUB_WORKSPACE" -name "coverage.xml"
- name: Archive code coverage results
uses: actions/upload-artifact@v3
with:
name: rosbag2-processing-service-coverage
path: telematic_system/thistorical_data_processing/rosbag2_processing_service/test/coverage.xml
if-no-files-found: error
sonar:
# Remove cloud bridge and vehicle bridge coverage temporarily as test build failed
needs: [telematic_cloud_messaging_coverage, web_app_client_coverage, web_app_server_coverage]
needs: [telematic_cloud_messaging_coverage, web_app_client_coverage, web_app_server_coverage, rosbag2_processing_service_coverage]
runs-on: ubuntu-latest
steps:
- name: Checkout ${{ github.event.repository.name }}
Expand Down Expand Up @@ -214,14 +253,17 @@ jobs:
sonar.scm.exclusions.disabled=true
extraProperties: |
sonar.verbose=true
sonar.python.coverage.reportPaths=$GITHUB_WORKSPACE/carma_cloud_bridge/coverage.xml,$GITHUB_WORKSPACE/carma_vehicle_bridge/coverage.xml
sonar.python.coverage.reportPaths=$GITHUB_WORKSPACE/carma_cloud_bridge/coverage.xml,$GITHUB_WORKSPACE/carma_vehicle_bridge/coverage.xml,$GITHUB_WORKSPACE/rosbag2_processing_service/coverage.xml
sonar.python.version=3.9
cloud_nats_bridge.sonar.projectBaseDir=$GITHUB_WORKSPACE/telematic_system/telematic_units/carma_cloud_bridge/cloud_nats_bridge
cloud_nats_bridge.sonar.sources=src
cloud_nats_bridge.sonar.tests=test
ros2_nats_bridge.sonar.projectBaseDir=$GITHUB_WORKSPACE/telematic_system/telematic_units/carma_vehicle_bridge/ros2_nats_bridge
ros2_nats_bridge.sonar.sources=.
ros2_nats_bridge.sonar.tests=test
ros2_nats_bridge.sonar.projectBaseDir=$GITHUB_WORKSPACE/telematic_system/historical_data_processing/rosbag2_processing_service
ros2_nats_bridge.sonar.sources=.
ros2_nats_bridge.sonar.tests=test
streets_nats_bridge.sonar.projectBaseDir=$GITHUB_WORKSPACE/telematic_system/telematic_units/carma_street_bridge/streets_nats_bridge
streets_nats_bridge.sonar.sources=src
telematic_cloud_messaging.sonar.projectBaseDir=$GITHUB_WORKSPACE/telematic_system/telematic_cloud_messaging
Expand Down

0 comments on commit baa74c7

Please sign in to comment.