readme: Add OSSF Scorecard badge #45
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: SonarCloud Scan | |
on: [push] | |
jobs: | |
sonarcloud: | |
runs-on: ubuntu-24.04 | |
steps: | |
- name: Checkout code including full history and submodules | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
fetch-depth: 0 | |
- name: Install dependencies from APT repository | |
run: | | |
sudo apt-get update | |
sudo apt-get install cmake gcovr libcunit1-dev ninja-build unzip wget | |
- name: Install sonar-scanner and build-wrapper | |
uses: sonarsource/sonarcloud-github-c-cpp@v2 | |
- name: Collect test coverage data | |
run: | | |
tools/ci/run_ci.sh \ | |
--run-build \ | |
--run-tests \ | |
--sonarqube build-wrapper-linux-x86-64 | |
- name: Run SonarCloud Scan | |
run: | | |
sonar-scanner \ | |
-Dsonar.branch.name="${GITHUB_REF_NAME}" \ | |
-Dsonar.cfamily.build-wrapper-output=build-wakaama/sonar-cloud-build-wrapper-output \ | |
-Dsonar.cfamily.cache.enabled=false \ | |
-Dsonar.cfamily.gcov.reportsPath=build-wakaama \ | |
-Dsonar.cfamily.threads=2 \ | |
-Dsonar.exclusions="build-wakaama-*/**, .git/**" \ | |
-Dsonar.host.url=https://sonarcloud.io \ | |
-Dsonar.login=${{ secrets.SONAR_TOKEN }} \ | |
-Dsonar.organization="eclipse" \ | |
-Dsonar.projectKey="eclipse_wakaama" \ | |
-Dsonar.sourceEncoding=UTF-8 \ | |
-Dsonar.sources=. | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |