Skip to content

Commit

Permalink
test: use sscanne
Browse files Browse the repository at this point in the history
  • Loading branch information
chris-tier4 committed Oct 2, 2024
1 parent b400e24 commit b159f06
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
20 changes: 15 additions & 5 deletions .github/workflows/BuildAndRun.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ jobs:

- name: Install sonar-scanner and build-wrapper
uses: sonarsource/sonarcloud-github-c-cpp@v3
env:
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}

- name: Build with SonarCloud Build Wrapper
run: |
Expand Down Expand Up @@ -114,13 +116,21 @@ jobs:
path: lcov
retention-days: 1

- name: Run SonarCloud scan
uses: SonarSource/sonarcloud-github-action@master
# - name: Run SonarCloud scan
# uses: SonarSource/sonarcloud-github-action@master
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
# SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
# with:
# projectBaseDir: ./src/scenario_simulator_v2

- name: Run sonar-scanner
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
with:
projectBaseDir: ./src/scenario_simulator_v2
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
working-directory: src/scenario_simulator_v2/
run: sonar-scanner --define sonar.cfamily.compile-commands="bw-output/compile_commands.json"

# - name: Debug
# if: ${{ always() }}
Expand Down
1 change: 0 additions & 1 deletion sonar-project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,4 @@ sonar.exclusions=**/test/**,**/mock/**
# Encoding of the source code. Default is default system encoding
sonar.sourceEncoding=UTF-8

sonar.cfamily.build-wrapper-output=bw-output
sonar.cfamily.gcov.reportsPath=/lcov/total_coverage.info

0 comments on commit b159f06

Please sign in to comment.