Skip to content

fix - get sim env variable #245

fix - get sim env variable

fix - get sim env variable #245

name: "CI: carma-cloud-nats-bridge"
on:
pull_request:
push:
branches-ignore:
- "develop"
jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3 # This action checks-out repository under $GITHUB_WORKSPACE, so our workflow can access it
- name: Set up Docker Buildx # This action checks-out repository under $GITHUB_WORKSPACE, so our workflow can access it
uses: docker/setup-buildx-action@v2
- name: Build
uses: docker/build-push-action@v3 # GitHub Action to build and push Docker images with Buildx
with:
context: ./telematic_system/telematic_units/carma_cloud_bridge/
file: ./telematic_system/telematic_units/carma_cloud_bridge/Dockerfile
sonar:
runs-on: ubuntu-latest
container:
image: usdotfhwastoldev/carma-base:develop
options: --user root
steps:
- uses: actions/checkout@v3
- run: sudo apt update && sudo apt -y install python3-coverage python3-pytest python3-watchdog ros-foxy-rclpy && sudo apt -y install glibc-source && sudo apt -y install libc6
- name: Install dep
run: python3 -m pip install -r ./telematic_system/telematic_units/carma_cloud_bridge/requirements.txt
- run: ls -la && source /opt/ros/foxy/setup.bash && cd ./telematic_system/telematic_units/carma_cloud_bridge/cloud_nats_bridge/test/ && python3 -m coverage run -m pytest && python3 -m coverage xml
shell: bash
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master # This action will create and boot a builder that can be used as buildx as a docker CLI
with:
args: >
-Dsonar.projectKey=usdot-fhwa-stol_cda-telematics
-Dsonar.python.coverage.reportPaths=./coverage.xml
-Dsonar.projectName=cda-telematics
-Dsonar.organization=usdot-fhwa-stol
-Dsonar.host.url=https://sonarcloud.io
-Dsonar.verbose=true
-Dsonar.java.binaries=.
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}