From edb95b17d4126998f44c8fcba229bf93a4ca0634 Mon Sep 17 00:00:00 2001 From: Miha Kralj <31756078+mihakralj@users.noreply.github.com> Date: Mon, 5 Aug 2024 14:35:32 -0700 Subject: [PATCH] Create SonarCloud.yml --- .github/workflows/SonarCloud.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/SonarCloud.yml diff --git a/.github/workflows/SonarCloud.yml b/.github/workflows/SonarCloud.yml new file mode 100644 index 00000000..93975f32 --- /dev/null +++ b/.github/workflows/SonarCloud.yml @@ -0,0 +1,30 @@ +name: SonarCloud analysis +on: + push: + pull_request: + workflow_dispatch: + +permissions: + pull-requests: read # allows SonarCloud to decorate PRs with analysis results + +jobs: + Analysis: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis + + - name: Analyze with SonarCloud + uses: SonarSource/sonarcloud-github-action@v2.0.2 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} # Generate a token on Sonarcloud.io, add it to the secrets of this repo with the name SONAR_TOKEN + with: + # Additional arguments for the SonarScanner CLI + args: > + -Dsonar.projectKey=mihakralj_QuanTAlib + -Dsonar.organization=mihakralj + -Dsonar.sources=. + -Dsonar.verbose=false