File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11name : Build with Tests
22
33on :
4- push :
5- workflow_dispatch :
6- pull_request :
7- types : [opened, edited]
4+ push :
5+ workflow_dispatch :
6+ inputs :
7+ SonarScanner :
8+ description : ' Enable SonarCloud analysis'
9+ type : boolean
10+ required : false
11+ default : true
12+ pull_request :
13+ types : [opened, edited]
814
915jobs :
1016 build_and_test_Windows :
@@ -69,10 +75,10 @@ jobs:
6975 fi
7076
7177 - name : Begin analysis on SonarCloud
72- if : ${{ steps.secret-check.outputs.run_analysis == 'true' }}
78+ if : ${{ steps.secret-check.outputs.run_analysis == 'true' && inputs.SonarScanner }}
7379 run : |
7480 dotnet sonarscanner begin /k:"zzzprojects_System.Linq.Dynamic.Core" /o:"zzzprojects" /d:sonar.branch.name=$BranchName /d:sonar.host.url="https://sonarcloud.io" /d:sonar.token=${{ secrets.SONAR_TOKEN }} /d:sonar.pullrequest.provider=github /d:sonar.dotnet.excludeTestProjects=true /d:sonar.cs.vscoveragexml.reportsPaths=**/dynamic-coverage-*.xml /d:sonar.verbose=true
75-
81+
7682 - name : Build
7783 run : |
7884 dotnet build ./src/System.Linq.Dynamic.Core/System.Linq.Dynamic.Core.csproj -c Debug -p:buildType=azure-pipelines-ci
94100 dotnet-coverage collect 'dotnet test ./test/System.Linq.Dynamic.Core.SystemTextJson.Tests/System.Linq.Dynamic.Core.SystemTextJson.Tests.csproj --configuration Debug --framework net10.0 -p:buildType=azure-pipelines-ci' -f xml -o dynamic-coverage-systemtextjson.xml
95101
96102 - name : End analysis on SonarCloud
97- if : ${{ steps.secret-check.outputs.run_analysis == 'true' }}
103+ if : ${{ steps.secret-check.outputs.run_analysis == 'true' && inputs.SonarScanner }}
98104 run : |
99- dotnet sonarscanner end /d:sonar.token=${{ secrets.SONAR_TOKEN }}
105+ dotnet sonarscanner end /d:sonar.token=${{ secrets.SONAR_TOKEN }}
You can’t perform that action at this time.
0 commit comments