ci: update Sonar #5
Workflow file for this run
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 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 }} |