File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed
Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change 66 include :
77 - dotnet : 2.1.500
88 mono : none
9- env :
10- - WITH_SONAR_ANALYSIS=false
119 - dotnet : 2.1 # latest available release
1210 mono : none
1311 env :
@@ -16,20 +14,20 @@ matrix:
1614solution : Mastercard.Developer.OAuth1Signer.sln
1715install :
1816 - dotnet restore
19- - $WITH_SONAR_ANALYSIS && dotnet tool install --global dotnet-sonarscanner
17+ - test $WITH_SONAR_ANALYSIS && dotnet tool install --global dotnet-sonarscanner || echo 'Skipping sonarscanner install'
2018before_script :
2119 - export PATH="$PATH:$HOME/.dotnet/tools"
2220 - |
23- $WITH_SONAR_ANALYSIS && dotnet sonarscanner begin \
21+ test $WITH_SONAR_ANALYSIS && dotnet sonarscanner begin \
2422 /k:"$SONAR_PROJECT_KEY" \
2523 /n:"$SONAR_PROJECT_NAME" \
2624 /d:sonar.organization="$SONAR_ORGANIZATION_KEY" \
2725 /d:sonar.host.url="$SONAR_URL" \
2826 /d:sonar.login="$SONAR_TOKEN" \
2927 /d:sonar.cs.vstest.reportsPaths="${TEST_RESULTS_PATH}/tests.trx" \
30- /d:sonar.cs.opencover.reportsPaths="${TEST_RESULTS_PATH}/coverage.xml"
28+ /d:sonar.cs.opencover.reportsPaths="${TEST_RESULTS_PATH}/coverage.xml" || echo 'Skipping sonarscanner begin'
3129script :
3230 - dotnet test -c Release -l:"trx;LogFileName=tests.trx" -r:"bin/" /p:CollectCoverage=true /p:CoverletOutputFormat="opencover" /p:CoverletOutput="bin/coverage.xml"
3331 - dotnet publish -c Release
3432after_success :
35- - $WITH_SONAR_ANALYSIS && dotnet sonarscanner end /d:sonar.login="$SONAR_TOKEN"
33+ - test $WITH_SONAR_ANALYSIS && dotnet sonarscanner end /d:sonar.login="$SONAR_TOKEN" || echo 'Skipping sonarscanner end'
You can’t perform that action at this time.
0 commit comments