Skip to content

Commit

Permalink
Adds test results and coverage to sonarqube
Browse files Browse the repository at this point in the history
  • Loading branch information
serialseb committed Mar 1, 2017
1 parent 393e2ab commit 8a4bbd4
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 36 deletions.
2 changes: 1 addition & 1 deletion build/funcs/Begin-SonarQube.ps1
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
$sonarBuildId = "com:github:$($env:APPVEYOR_REPO_NAME.Replace("/", ":"))"
MSBuild.SonarQube.Runner.exe begin /k:"$sonarBuildId" /n:"$env:SEB_PROJECT_NAME" /v:"$env:SEB_VERSION_PREFIX" /d:"sonar.host.url=https://sonarqube.com" /d:"sonar.login=$env:SONARQUBE_TOKEN"
MSBuild.SonarQube.Runner.exe begin /k:"$sonarBuildId" /n:"$env:SEB_PROJECT_NAME" /v:"$env:SEB_VERSION_PREFIX" /d:sonar.cs.opencover.reportsPaths="opencoverCoverage.xml" /d:sonar.cs.xunit.reportsPaths=="XUnitResults.xml" /d:"sonar.host.url=https://sonarqube.com" /d:"sonar.login=$env:SONARQUBE_TOKEN"
2 changes: 1 addition & 1 deletion build/funcs/Set-Version.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ $build = $env:APPVEYOR_BUILD_NUMBER | % PadLeft 4 '0'
$major = $version.Major
$branch = $env:APPVEYOR_REPO_BRANCH

if ($env:APPVEYOR_REPO_TAG){
if ($env:APPVEYOR_REPO_TAG) {
$version = $env:APPVEYOR_REPO_TAG_NAME
$buildVersionPrefix = $version
} else {
Expand Down
33 changes: 0 additions & 33 deletions build/funcs/Set-Version.ps1.orig

This file was deleted.

2 changes: 1 addition & 1 deletion build/funcs/Test-Code.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ $xunit = (Resolve-Path "src/packages/xunit.runner.console.*/tools/xunit.console.
$opencover = (Resolve-Path "src/packages/OpenCover.*/tools/OpenCover.Console.exe").ToString()
$coveralls = (Resolve-Path "src/packages/coveralls.net.*/tools/csmacnz.Coveralls.exe").ToString()

& $opencover -register:user -target:$xunit -returntargetcode "-targetargs:""src\$env:SEB_PROJECT_NAME\bin\$env:CONFIGURATION\$env:SEB_PROJECT_NAME.dll"" -noshadow -appveyor -xml XUnitResults.xml" -filter:"+[*]* -[*]Json.*" -output:opencoverCoverage.xml -searchdirs:"src\$env:SEB_PROJECT_NAME\bin\$env:CONFIGURATION\"
& $opencover -register:user -target:$xunit -returntargetcode "-targetargs:""src\Tests\bin\$env:CONFIGURATION\Tests.dll"" -noshadow -appveyor -xml XUnitResults.xml" -filter:"+[*]* -[*]Json.*" -output:opencoverCoverage.xml -searchdirs:"src\$env:SEB_PROJECT_NAME\bin\$env:CONFIGURATION\"
& $coveralls --opencover -i opencoverCoverage.xml --repoToken $env:COVERALLS_REPO_TOKEN --commitId $env:APPVEYOR_REPO_COMMIT --commitBranch $env:APPVEYOR_REPO_BRANCH --commitAuthor $env:APPVEYOR_REPO_COMMIT_AUTHOR --commitEmail $env:APPVEYOR_REPO_COMMIT_AUTHOR_EMAIL --commitMessage $env:APPVEYOR_REPO_COMMIT_MESSAGE --jobId $env:APPVEYOR_JOB_ID

Push-AppveyorArtifact opencoverCoverage.xml
Expand Down

0 comments on commit 8a4bbd4

Please sign in to comment.