diff --git a/.github/workflows/sonarcloud.yml b/.github/workflows/sonarcloud.yml new file mode 100644 index 00000000..6b3e4b78 --- /dev/null +++ b/.github/workflows/sonarcloud.yml @@ -0,0 +1,24 @@ +name: SonarCloud Analysis + +on: + push: + branches: + - master + pull_request: + branches: + - master + types: [opened, synchronize, reopened] + +jobs: + sonarcloud: + name: SonarCloud + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: SonarCloud Scan + uses: SonarSource/sonarqube-scan-action@fd88b7d7ccbaefd23d8f36f73b59db7a3d246602 # v6 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} \ No newline at end of file diff --git a/sonar-project.properties b/sonar-project.properties new file mode 100644 index 00000000..a5d5c12e --- /dev/null +++ b/sonar-project.properties @@ -0,0 +1,5 @@ +sonar.projectKey=NHSDigital_validated-relationships-service-api +sonar.organization=nhsdigital +sonar.exclusions=**/node_modules/**,**/dist/**,**/tests/** +sonar.sources=sandbox +sonar.python.version=3.13 \ No newline at end of file