Skip to content

Commit 0727187

Browse files
committed
update sonar part of github action
1 parent d1a79be commit 0727187

File tree

1 file changed

+15
-6
lines changed

1 file changed

+15
-6
lines changed

.github/workflows/build.yml

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ jobs:
8484
# name: codecov-umbrella
8585

8686
- name: Install sonar-scanner and build-wrapper
87-
uses: SonarSource/sonarcloud-github-c-cpp@v2
87+
uses: SonarSource/sonarqube-scan-action/install-build-wrapper@v7
8888
- name: Run build-wrapper
8989
run: |
9090
mkdir build
@@ -97,17 +97,26 @@ jobs:
9797
./unit_tests
9898
./examples/open_seek_write
9999
./examples/jbod
100+
export LD_LIBRARY_PATH="/usr/local/lib:$LD_LIBRARY_PATH"
101+
export PYTHONPATH="/usr/local/lib/python3.12/dist-packages/"
102+
cd test/python
103+
python ./unit_tests_python.py
104+
cd ../..
100105
- name: Collect coverage into one XML report
101106
run: |
102107
gcovr -e test -e examples --sonarqube -u -o coverage.xml --exclude-throw-branches \
103108
--gcov-ignore-parse-errors --exclude-unreachable-branches
104-
- name: Run sonar-scanner
109+
110+
- name: Sonar Scan
111+
uses: SonarSource/sonarqube-scan-action@v7
105112
env:
106-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
107113
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
108-
run: |
109-
sonar-scanner --define sonar.cfamily.compile-commands="${{ env.BUILD_WRAPPER_OUT_DIR }}/compile_commands.json" \
110-
--define sonar.coverageReportPaths=coverage.xml
114+
with:
115+
args: >
116+
-Dsonar.projectKey=simgrid_dtlmod
117+
-Dsonar.organization=simgrid
118+
-Dsonar.cfamily.build-wrapper-output=${{ env.BUILD_WRAPPER_OUT_DIR }}
119+
-Dsonar.coverageReportPaths=coverage.xml
111120
112121
- name: Install Doxygen and Sphinx
113122
run: |

0 commit comments

Comments
 (0)