chore(deps): update default registry's baseline to d5ec528843d29e3a52d745a64b469f810b2cedbf
#46
Workflow file for this run
This file contains hidden or 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 | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
types: | |
- opened | |
- synchronize | |
- reopened | |
permissions: | |
contents: read | |
jobs: | |
build: | |
name: Build and analyze | |
runs-on: ubuntu-latest | |
env: | |
BUILD_WRAPPER_OUT_DIR: build_wrapper_output_directory | |
permissions: | |
contents: read | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@4d991eb9b905ef189e4c376166672c3f2f230481 # v2.11.0 | |
with: | |
egress-policy: audit | |
allowed-endpoints: | |
analysis-sensorcache-eu-central-1-prod.s3.amazonaws.com:443 | |
api.github.com:443 | |
api.nuget.org:443 | |
api.sonarcloud.io:443 | |
azure.archive.ubuntu.com:80 | |
binaries.sonarsource.com:443 | |
cli.codecov.io:443 | |
esm.ubuntu.com:443 | |
github.com:443 | |
ingest.codecov.io:443 | |
keybase.io:443 | |
motd.ubuntu.com:443 | |
o26192.ingest.us.sentry.io:443 | |
packages.microsoft.com:443 | |
scanner.sonarcloud.io:443 | |
sonarcloud.io:443 | |
storage.googleapis.com:443 | |
- name: Check out code | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
with: | |
fetch-depth: 0 | |
- name: Install dependencies | |
uses: ./.github/actions/install-dependencies | |
- name: Generate compilation database | |
run: cmake -B build -DCMAKE_BUILD_TYPE=Coverage -DCMAKE_CXX_COMPILER=clang++ | |
- name: Generate coverage report | |
run: cmake --build build --target coverage -j $(nproc) | |
- name: Run sonar-scanner | |
uses: SonarSource/sonarqube-scan-action@0303d6b62e310685c0e34d0b9cde218036885c4d # v5.0.0 | |
with: | |
args: > | |
--define sonar.cfamily.compile-commands=build/compile_commands.json | |
--define sonar.coverageReportPaths=build/coverage/coverage.xml | |
env: | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
- name: Upload coverage reports to Codecov | |
uses: codecov/codecov-action@13ce06bfc6bbe3ecf90edbbf1bc32fe5978ca1d3 # v5.3.1 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
file: build/coverage/coverage.lcov |