From 00405f0accd330cc18f6e2162dcc5d60fabd435f Mon Sep 17 00:00:00 2001 From: Dmitry Turin Date: Thu, 3 Dec 2015 18:46:48 +0200 Subject: [PATCH 1/2] Switch to codecov --- README.md | 2 +- appveyor.yml | 9 +++++---- run-tests-and-coverage.ps1 | 24 ------------------------ 3 files changed, 6 insertions(+), 29 deletions(-) delete mode 100644 run-tests-and-coverage.ps1 diff --git a/README.md b/README.md index 3241be7..f4d4a49 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ NModbus4 | |Build Status|Code Coverage| |-----------|:----------:|:-----------:| |**Mono**|[![Build Status](https://travis-ci.org/NModbus4/NModbus4.svg?branch=portable-3.0)](https://travis-ci.org/NModbus4/NModbus4)|| -|**MS .NET**|[![Build status](https://ci.appveyor.com/api/projects/status/9irkluk69cr0f5ed?svg=true)](https://ci.appveyor.com/project/Maxwe11/nmodbus4-ss8e4)|[![Coverage Status](https://coveralls.io/repos/NModbus4/NModbus4/badge.svg?branch=portable-3.0&service=github)](https://coveralls.io/github/NModbus4/NModbus4?branch=portable-3.0)| +|**MS .NET**|[![Build status](https://ci.appveyor.com/api/projects/status/9irkluk69cr0f5ed?svg=true)](https://ci.appveyor.com/project/Maxwe11/nmodbus4-ss8e4)|[![codecov.io](https://codecov.io/github/NModbus4/NModbus4/coverage.svg?branch=portable-3.0)](https://codecov.io/github/NModbus4/NModbus4?branch=portable-3.0)| [![Join the chat at https://gitter.im/NModbus4/NModbus4](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/NModbus4/NModbus4?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) diff --git a/appveyor.yml b/appveyor.yml index 0e52d6c..99aa171 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -12,9 +12,10 @@ before_build: build: project: NModbus4.sln verbosity: minimal +test_script: +- .\packages\OpenCover.4.6.166\tools\OpenCover.Console.exe -register:user -target:"./packages/xunit.runner.console.2.0.0/tools/xunit.console.exe" -targetargs:"./NModbus4.UnitTests/bin/Debug/NModbus4.UnitTests.dll -noshadow -appveyor" -returntargetcode -filter:"+[NModbus4]*" -excludebyattribute:*.ExcludeFromCodeCoverage* -hideskipped:All -output:./opencover_report.xml +- "SET PATH=C:/Python34;C:/Python34/Scripts;%PATH%" +- pip install codecov +- codecov -f "./opencover_report.xml" cache: - packages -> **\packages.config -test_script: -- ps: "./run-tests-and-coverage.ps1" -artifacts: -- path: ./codecoverage diff --git a/run-tests-and-coverage.ps1 b/run-tests-and-coverage.ps1 deleted file mode 100644 index 7703be7..0000000 --- a/run-tests-and-coverage.ps1 +++ /dev/null @@ -1,24 +0,0 @@ -$isPullRequest = $env:APPVEYOR_PULL_REQUEST_NUMBER -ne $null -$packagesDir = "./packages" -$coverageDir = "./codecoverage" -$xunitConsoleExe = "$packagesDir/xunit.runner.console.2.0.0/tools/xunit.console.exe" -$openCoverExe = "$packagesDir/OpenCover.4.6.166/tools/OpenCover.Console.exe" -$reportGeneratorExe = "$packagesDir/ReportGenerator.2.2.0.0/tools/ReportGenerator.exe" -$testDir = "*Tests/bin/*" -$tests = @("$testDir/*Tests.dll") -$targetArgs = Get-ChildItem $tests -Recurse -$openCoverXml = "opencover_report.xml" -$xunitXml = "xunit_report.xml" -$converallsNetExe = "$packagesDir/coveralls.io.1.3.4/tools/coveralls.net.exe" -$openCoverArgs = @('-register:user', "`"-target:$xunitConsoleExe`"", "`"-targetargs:$targetArgs -appveyor -noshadow -nologo -quiet`"", "`"-filter:+[NModbus4]*`"", "`"-output:$openCoverXml`"", '-coverbytest:*Tests.dll', '-log:All', '-returntargetcode') -& $xunitConsoleExe $targetArgs -xml $xunitXml -$testsFailed = Select-String $xunitXml -pattern "" -Quiet -if (!$testsFailed) -{ - & $openCoverExe $openCoverArgs - & $reportGeneratorExe -verbosity:Info "`"-reports:$openCoverXml`"" "`"-targetdir:$coverageDir`"" - if (!$isPullRequest) - { - & $converallsNetExe --opencover $openCoverXml --full-sources --repo-token gSRzaRcGVrNfpOrbaEwGCEej4KypnMnK1 - } -} From 7ea77d74a488f3689e38702c30fc31b380fbfff4 Mon Sep 17 00:00:00 2001 From: Dmitry Turin Date: Sun, 6 Dec 2015 15:06:51 +0200 Subject: [PATCH 2/2] Update nuget packages --- .../NModbus4.IntegrationTests.csproj | 13 ++++++++----- NModbus4.IntegrationTests/packages.config | 13 ++++++------- NModbus4.UnitTests/NModbus4.UnitTests.csproj | 19 +++++++++++-------- NModbus4.UnitTests/packages.config | 17 ++++++++--------- Samples/Samples.csproj | 6 +++--- Samples/packages.config | 2 +- appveyor.yml | 2 +- 7 files changed, 38 insertions(+), 34 deletions(-) diff --git a/NModbus4.IntegrationTests/NModbus4.IntegrationTests.csproj b/NModbus4.IntegrationTests/NModbus4.IntegrationTests.csproj index 6ee265e..ff45981 100644 --- a/NModbus4.IntegrationTests/NModbus4.IntegrationTests.csproj +++ b/NModbus4.IntegrationTests/NModbus4.IntegrationTests.csproj @@ -1,6 +1,5 @@  - Debug AnyCPU @@ -41,12 +40,16 @@ ..\packages\xunit.abstractions.2.0.0\lib\net35\xunit.abstractions.dll True - - ..\packages\xunit.assert.2.0.0\lib\portable-net45+win+wpa81+wp80+monotouch+monoandroid+Xamarin.iOS\xunit.assert.dll + + ..\packages\xunit.assert.2.1.0\lib\dotnet\xunit.assert.dll True - - ..\packages\xunit.extensibility.core.2.0.0\lib\portable-net45+win+wpa81+wp80+monotouch+monoandroid+Xamarin.iOS\xunit.core.dll + + ..\packages\xunit.extensibility.core.2.1.0\lib\dotnet\xunit.core.dll + True + + + ..\packages\xunit.extensibility.execution.2.1.0\lib\net45\xunit.execution.desktop.dll True diff --git a/NModbus4.IntegrationTests/packages.config b/NModbus4.IntegrationTests/packages.config index 3596fd3..4514dc3 100644 --- a/NModbus4.IntegrationTests/packages.config +++ b/NModbus4.IntegrationTests/packages.config @@ -1,13 +1,12 @@  - - - + - - - - + + + + + \ No newline at end of file diff --git a/NModbus4.UnitTests/NModbus4.UnitTests.csproj b/NModbus4.UnitTests/NModbus4.UnitTests.csproj index 175e63e..9a6075a 100644 --- a/NModbus4.UnitTests/NModbus4.UnitTests.csproj +++ b/NModbus4.UnitTests/NModbus4.UnitTests.csproj @@ -1,7 +1,6 @@  - - + Debug AnyCPU @@ -36,8 +35,8 @@ NModbus4.UnitTests.ruleset - - ..\packages\Moq.4.2.1507.0118\lib\net40\Moq.dll + + ..\packages\Moq.4.2.1510.2205\lib\net40\Moq.dll True @@ -48,12 +47,16 @@ ..\packages\xunit.abstractions.2.0.0\lib\net35\xunit.abstractions.dll True - - ..\packages\xunit.assert.2.0.0\lib\portable-net45+win+wpa81+wp80+monotouch+monoandroid+Xamarin.iOS\xunit.assert.dll + + ..\packages\xunit.assert.2.1.0\lib\dotnet\xunit.assert.dll True - - ..\packages\xunit.extensibility.core.2.0.0\lib\portable-net45+win+wpa81+wp80+monotouch+monoandroid+Xamarin.iOS\xunit.core.dll + + ..\packages\xunit.extensibility.core.2.1.0\lib\dotnet\xunit.core.dll + True + + + ..\packages\xunit.extensibility.execution.2.1.0\lib\net45\xunit.execution.desktop.dll True diff --git a/NModbus4.UnitTests/packages.config b/NModbus4.UnitTests/packages.config index 771e972..565bfc1 100644 --- a/NModbus4.UnitTests/packages.config +++ b/NModbus4.UnitTests/packages.config @@ -1,15 +1,14 @@  - - + - - + - - - - - + + + + + + \ No newline at end of file diff --git a/Samples/Samples.csproj b/Samples/Samples.csproj index 5f2f135..748f07e 100644 --- a/Samples/Samples.csproj +++ b/Samples/Samples.csproj @@ -33,9 +33,9 @@ false - - False - ..\packages\log4net.2.0.3\lib\net40-full\log4net.dll + + ..\packages\log4net.2.0.4\lib\net45-full\log4net.dll + True ..\packages\NModbus4.2.1.0\lib\net40\NModbus4.dll diff --git a/Samples/packages.config b/Samples/packages.config index 5508b8d..0d56747 100644 --- a/Samples/packages.config +++ b/Samples/packages.config @@ -1,5 +1,5 @@  - + \ No newline at end of file diff --git a/appveyor.yml b/appveyor.yml index 99aa171..244da0d 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -13,7 +13,7 @@ build: project: NModbus4.sln verbosity: minimal test_script: -- .\packages\OpenCover.4.6.166\tools\OpenCover.Console.exe -register:user -target:"./packages/xunit.runner.console.2.0.0/tools/xunit.console.exe" -targetargs:"./NModbus4.UnitTests/bin/Debug/NModbus4.UnitTests.dll -noshadow -appveyor" -returntargetcode -filter:"+[NModbus4]*" -excludebyattribute:*.ExcludeFromCodeCoverage* -hideskipped:All -output:./opencover_report.xml +- .\packages\OpenCover.4.6.166\tools\OpenCover.Console.exe -register:user -target:"./packages/xunit.runner.console.2.1.0/tools/xunit.console.exe" -targetargs:"./NModbus4.UnitTests/bin/Debug/NModbus4.UnitTests.dll -noshadow -appveyor" -returntargetcode -filter:"+[NModbus4]*" -excludebyattribute:*.ExcludeFromCodeCoverage* -hideskipped:All -output:./opencover_report.xml - "SET PATH=C:/Python34;C:/Python34/Scripts;%PATH%" - pip install codecov - codecov -f "./opencover_report.xml"