From 6c8ac4f7422bd65766cfed129b99d0b443cabe4b Mon Sep 17 00:00:00 2001 From: James South Date: Thu, 26 Mar 2015 23:02:49 +0000 Subject: [PATCH] Attempt to add coveralls Former-commit-id: 4d778ee94d84fa5764824fbbe874d377543e7961 Former-commit-id: ec558b37faaef1c5f6d4f9bf8b14ca8f30cdee3f Former-commit-id: 332403a4acf667645aa321e6fe7a4b6d12e948c6 --- appveyor.yml | 8 +++++++- build/build.ps1 | 6 +++++- src/.nuget/packages.config | 1 + 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 9ebaa52599..c2cd078201 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -22,13 +22,19 @@ os: Windows Server 2012 matrix: fast_finish: true # set this flag to immediately finish build once one of the jobs fails. +environment: + COVERALLS_REPO_TOKEN: + secure: UQiSUNs39uWy45YG1iS9hatwF5ouX0Q2c + #---------------------------------# # build configuration # #---------------------------------# # to run your custom scripts instead of automatic MSBuild -build_script: +before_build: - ps: Import-Module .\build\psake.psm1 + +build_script: - ps: Invoke-Psake .\build\build.ps1 -properties @{"BuildNumber"=$env:APPVEYOR_BUILD_NUMBER} #---------------------------------# diff --git a/build/build.ps1 b/build/build.ps1 index 57ed576ced..37c532ab56 100644 --- a/build/build.ps1 +++ b/build/build.ps1 @@ -22,6 +22,7 @@ Properties { # External binaries paths $NUGET_EXE = Join-Path $SRC_PATH ".nuget\NuGet.exe" $NUNIT_EXE = Join-Path $SRC_PATH "packages\NUnit.Runners.2.6.3\tools\nunit-console.exe" + $COVERALLS_EXE = Join-Path $SRC_PATH "packages\coveralls.io.1.3.2\tools\coveralls.net.exe" $OPENCOVER_EXE = Join-Path $SRC_PATH "packages\OpenCover.4.5.3207\OpenCover.Console.exe" $REPORTGEN_EXE = Join-Path $SRC_PATH "packages\ReportGenerator.1.9.1.0\ReportGenerator.exe" $NUNITREPORT_EXE = Join-Path $BUILD_PATH "tools\NUnitHTMLReportGenerator.exe" @@ -39,7 +40,7 @@ Properties { Framework "4.0x86" FormatTaskName "-------- {0} --------" -task default -depends Cleanup-Binaries, Set-VersionNumber, Build-Solution, Run-Tests, Generate-APIDoc, Generate-Nuget +task default -depends Cleanup-Binaries, Set-VersionNumber, Build-Solution, Run-Tests, Run-Coverage, Generate-APIDoc, Generate-Nuget # cleans up the binaries output folder task Cleanup-Binaries { @@ -157,6 +158,9 @@ task Run-Coverage -depends Build-Tests { Write-Host "Transforming coverage results file to HTML" & $REPORTGEN_EXE -reports:$CoverageOutputPath -targetdir:(Join-Path $TEST_RESULTS "Coverage\$_") + + Write-Host "Uploading coverage report to Coveralls.io" + Exec { . $COVERALLS_EXE --opencover $CoverageOutputPath } } } diff --git a/src/.nuget/packages.config b/src/.nuget/packages.config index 9cfde32e18..232098461c 100644 --- a/src/.nuget/packages.config +++ b/src/.nuget/packages.config @@ -1,5 +1,6 @@  +