diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a4c276d55..861b5d735 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -108,11 +108,17 @@ jobs: with: branch: gh-pages # The branch the action should deploy to. folder: javadocs # The folder the action should deploy. - - name: 🩺 SonarCloud + - name: 🩺 SonarCloud: Java + if: "${{ env.SONAR_TOKEN != '' }}" env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - if: "${{ env.SONAR_TOKEN != '' }}" run: | cd Plan ./gradlew sonar -Dsonar.host.url=https://sonarcloud.io -Dsonar.organization=player-analytics-plan + - name: 🩺 SonarCloud: React + if: "${{ env.SONAR_TOKEN != '' }}" + uses: SonarSource/sonarcloud-github-action@master + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} diff --git a/sonar-project.properties b/sonar-project.properties new file mode 100644 index 000000000..bbcd0ae71 --- /dev/null +++ b/sonar-project.properties @@ -0,0 +1,11 @@ +sonar.projectKey=plan-player-analytics_Plan +sonar.organization=player-analytics-plan + +# This is the name and version displayed in the SonarCloud UI. +sonar.projectName=Plan React Code + +# Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows. +sonar.sources=Plan/react/dashboard + +# Encoding of the source code. Default is default system encoding +sonar.sourceEncoding=UTF-8 \ No newline at end of file