Skip to content

ci: update Sonar

ci: update Sonar #5

Workflow file for this run

name: SonarCloud Analysis
on:
pull_request:
branches:
- '**' # Trigger on pull requests targeting any branch
jobs:
sonarcloud:
name: Sonar Analysis
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Ensure full history is fetched for accurate analysis
- name: Download coverage artifact
uses: actions/download-artifact@v4
with:
name: coverage
path: coverage
- name: SonarCloud Scan
uses: sonarsource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
with:
args: >
-Dsonar.pullrequest.key=${{ github.event.pull_request.number }}
-Dsonar.pullrequest.branch=${{ github.head_ref }}
-Dsonar.pullrequest.base=${{ github.base_ref }}