From b79cde54073e0f579f44ad6f1aa297f2643277b7 Mon Sep 17 00:00:00 2001 From: roshaanbajwa Date: Wed, 6 Dec 2023 11:13:46 +0000 Subject: [PATCH] add sonarcloud to pull request yaml --- .github/workflows/pull-request.yml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) 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