diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 0c336d808..dbd37d984 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -12,7 +12,21 @@ jobs: - name: Install dependencies run: npm install - + + - task: SonarCloudPrepare@1 + displayName: 'Prepare analysis on SonarCloud' + inputs: + SonarCloud: 'SonarCloud' + organization: 'nhsdigital' + scannerMode: 'CLI' + extraProperties: | + sonar.projectKey=nhsuk-frontend + sonar.exclusions=$(System.DefaultWorkingDirectory)/dependency-scan-results/** + sonar.javascript.lcov.reportPaths=coverage/lcov.info + sonar.coverage.exclusions=**/*.config.js,**/coverage/** + sonar.dependencyCheck.htmlReportPath=$(System.DefaultWorkingDirectory)/dependency-scan-results/dependency-check-report.html + sonar.language=js + - name: Run linting run: npm run lint