Skip to content

chore(deps): update actions/upload-pages-artifact action to v4 #188

chore(deps): update actions/upload-pages-artifact action to v4

chore(deps): update actions/upload-pages-artifact action to v4 #188

Workflow file for this run

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
permissions:
contents: read
steps:
- name: Harden Runner
uses: step-security/harden-runner@ec9f2d5744a09debf3a187a3f4f675c53b671911 # v2.13.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@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
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@8c71dc039c2dd71d3821e89a2b58ecc7fee6ced9 # v5.3.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@18283e04ce6e62d37312384ff67231eb8fd56d24 # v5.4.3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: build/coverage/coverage.lcov