11language : csharp
2- solution : Mastercard.Developer.OAuth1Signer.sln
3- jobs :
2+ git :
3+ depth : false # "Shallow clone detected during the analysis"
4+ matrix :
5+ fast_finish : true
46 include :
5- - stage : Test
6- dotnet : 2.1.500
7- mono : none
8- install :
9- - dotnet restore
10- script :
11- - dotnet test -c Release
12- - dotnet publish -c Release
13- - stage : Test with code analysis
14- dotnet : 2.1 # latest available release
15- mono : none
16- git :
17- depth : false # "Shallow clone detected during the analysis"
18- install :
19- - dotnet tool install --global dotnet-sonarscanner
20- - dotnet restore
21- before_script :
22- - export PATH="$PATH:$HOME/.dotnet/tools"
23- env :
24- - TEST_RESULTS_PATH=./Mastercard.Developer.OAuth1Signer.Tests/bin
25- script :
26- - |
27- dotnet sonarscanner begin \
28- /k:"$SONAR_PROJECT_KEY" \
29- /d:sonar.organization="$SONAR_ORGANIZATION_KEY" \
30- /d:sonar.host.url="$SONAR_URL" \
31- /d:sonar.login="$SONAR_TOKEN" \
32- /d:sonar.cs.vstest.reportsPaths="${TEST_RESULTS_PATH}/tests.trx" \
33- /d:sonar.cs.opencover.reportsPaths="${TEST_RESULTS_PATH}/coverage.xml"
34- - dotnet test -c Release -l:"trx;LogFileName=tests.trx" -r:"bin/" /p:CollectCoverage=true /p:CoverletOutputFormat="opencover" /p:CoverletOutput="bin/coverage.xml"
35- - dotnet publish -c Release
36- - dotnet sonarscanner end /d:sonar.login="$SONAR_TOKEN"
7+ - dotnet : 2.1.500
8+ mono : none
9+ - dotnet : 2.1 # latest available release
10+ mono : none
11+ env :
12+ - WITH_SONAR_ANALYSIS=true
13+ - TEST_RESULTS_PATH=./Mastercard.Developer.OAuth1Signer.Tests/bin
14+ solution : Mastercard.Developer.OAuth1Signer.sln
15+ before_script :
16+ - export PATH="$PATH:$HOME/.dotnet/tools"
17+ install :
18+ - test $WITH_SONAR_ANALYSIS && dotnet tool install --global dotnet-sonarscanner
19+ - dotnet restore
20+ script :
21+ - |
22+ test $WITH_SONAR_ANALYSIS && dotnet sonarscanner begin \
23+ /k:"$SONAR_PROJECT_KEY" \
24+ /d:sonar.projectName="$SONAR_PROJECT_NAME" \
25+ /d:sonar.organization="$SONAR_ORGANIZATION_KEY" \
26+ /d:sonar.host.url="$SONAR_URL" \
27+ /d:sonar.login="$SONAR_TOKEN" \
28+ /d:sonar.cs.vstest.reportsPaths="${TEST_RESULTS_PATH}/tests.trx" \
29+ /d:sonar.cs.opencover.reportsPaths="${TEST_RESULTS_PATH}/coverage.xml"
30+ - dotnet test -c Release -l:"trx;LogFileName=tests.trx" -r:"bin/" /p:CollectCoverage=true /p:CoverletOutputFormat="opencover" /p:CoverletOutput="bin/coverage.xml"
31+ - dotnet publish -c Release
32+ - test $WITH_SONAR_ANALYSIS && dotnet sonarscanner end /d:sonar.login="$SONAR_TOKEN"
0 commit comments