File tree Expand file tree Collapse file tree 2 files changed +14
-13
lines changed
Expand file tree Collapse file tree 2 files changed +14
-13
lines changed Original file line number Diff line number Diff line change 8888 - name : Run integration tests
8989 run : dotnet test ./working-dir/KeeperData.Bridge.sln --filter "Dependence=docker&testtype!=performance"
9090
91- # # SonarCloud
92- # # Uncomment to unable SonarCloud scan
93- # # Requires project to be set up in SonarCloud
94- # # and the SonarCloud token to be set in the repository secrets
95- # sonarcloud-scan:
96- # name: CDP SonarCloud Scan
97- # uses: ./.github/workflows/sonarcloud.yml
98- # needs: pr-validator
99- # secrets: inherit
91+ sonarcloud-scan :
92+ name : CDP SonarCloud Scan
93+ uses : ./.github/workflows/sonarcloud.yml
94+ needs : pr-validator
95+ secrets :
96+ SONAR_TOKEN : ${{ secrets.SONAR_TOKEN }}
Original file line number Diff line number Diff line change @@ -2,6 +2,10 @@ name: Run SonarCloud coverage scan
22
33on :
44 workflow_call :
5+ secrets :
6+ SONAR_TOKEN :
7+ description : " SonarCloud token used for authentication"
8+ required : true
59
610permissions :
711 id-token : write
6468 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
6569 SONAR_TOKEN : ${{ secrets.SONAR_TOKEN }}
6670 run : |
67- ./.sonar/scanner/dotnet-sonarscanner begin /k:"DEFRA_cdp-dotnet-backend-template " /o:"defra" /d:sonar.token="${{ secrets. SONAR_TOKEN }} " /d:sonar.host.url="https://sonarcloud.io" /d:sonar.cs.vscoveragexml.reportsPaths=coverage.xml
68- dotnet build --no-incremental
69- ./.sonar/coverage/dotnet-coverage collect "dotnet test" -f xml -o "coverage.xml"
70- ./.sonar/scanner/dotnet-sonarscanner end /d:sonar.token="${{ secrets. SONAR_TOKEN }} "
71+ ./.sonar/scanner/dotnet-sonarscanner begin /k:"DEFRA_ls-keeper-data-bridge-backend " /o:"defra" /d:sonar.token="$SONAR_TOKEN" /d:sonar.host.url="https://sonarcloud.io" /d:sonar.cs.vscoveragexml.reportsPaths=coverage.xml
72+ dotnet build KeeperData.Bridge.sln --no-incremental
73+ ./.sonar/coverage/dotnet-coverage collect "dotnet test KeeperData.Bridge.sln --filter \"Dependence!=docker&testtype!=performance\" " -f xml -o "coverage.xml"
74+ ./.sonar/scanner/dotnet-sonarscanner end /d:sonar.token="$SONAR_TOKEN"
You can’t perform that action at this time.
0 commit comments