Skip to content

Commit

Permalink
CI: Update sonar-scanner (#2167)
Browse files Browse the repository at this point in the history
* CI: Update sonar-scanner

* Fix: `The property 'sonar.login' is deprecated and will be removed in the future. Please use the 'sonar.token' property instead when passing a token.`

* Remove sonar cache config and GHA cache action

By now, cache is stored on the server by default

see https://docs.sonarcloud.io/advanced-setup/languages/c-c-objective-c/#analysis-cache

* Sonar token to secrets
  • Loading branch information
dweindl authored Aug 25, 2023
1 parent 98c782d commit 8c80329
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
10 changes: 2 additions & 8 deletions .github/workflows/test_python_cplusplus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
- run: echo "BNGPATH=${GITHUB_WORKSPACE}/ThirdParty/BioNetGen-2.7.0" >> $GITHUB_ENV

# sonar cloud
- run: echo "SONAR_SCANNER_VERSION=4.7.0.2747" >> $GITHUB_ENV
- run: echo "SONAR_SCANNER_VERSION=5.0.1.3006" >> $GITHUB_ENV
- run: echo "SONAR_SCANNER_HOME=${HOME}/.sonar/sonar-scanner-$SONAR_SCANNER_VERSION-linux" >> $GITHUB_ENV
- run: echo "SONAR_SCANNER_OPTS=-server" >> $GITHUB_ENV
- run: echo "${SONAR_SCANNER_HOME}/bin" >> $GITHUB_PATH
Expand Down Expand Up @@ -77,13 +77,6 @@ jobs:
run: |
CI_SONARCLOUD=TRUE scripts/buildAmici.sh
- name: Cache sonar files
id: cache-sonar
uses: actions/cache@v3
with:
path: sonar_cache
key: ${{ runner.os }}-sonar_cache

- name: C++ tests
run: |
scripts/run-cpp-tests.sh
Expand Down Expand Up @@ -157,6 +150,7 @@ jobs:
- name: Run sonar-scanner
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: |
sonar-scanner \
-Dsonar.cfamily.build-wrapper-output=bw-output \
Expand Down
3 changes: 0 additions & 3 deletions sonar-project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
# https://sonarcloud.io/documentation/analysis/languages/cfamily/

sonar.host.url=https://sonarcloud.io
sonar.login=af35cb17710485d21c8e453a77f1f008eae1f7a4
sonar.organization=icb-dcm
sonar.projectKey=ICB-DCM_AMICI

Expand All @@ -27,8 +26,6 @@ sonar.sourceEncoding=UTF-8

sonar.cfamily.threads=2
sonar.cfamily.gcov.reportsPath=build
sonar.cfamily.cache.enabled=true
sonar.cfamily.cache.path=sonar_cache
sonar.cpp.std=c++17

sonar.python.coverage.reportPaths=build/coverage_py.xml
Expand Down

0 comments on commit 8c80329

Please sign in to comment.