-
Notifications
You must be signed in to change notification settings - Fork 31
CI Integrations
maxkoryukov edited this page Jan 9, 2016
·
14 revisions
- AppVeyor CI
- Jenkins
-
Travis-CI(coming soon) -
Bamboo(coming soon)
- Add the following NuGet dependencies to your project
nunit-runner
(if you using NUnit),opencover
,coveralls.net
. Samplepackages.config
:<packages> <!-- opencover and coveralls.net (just get latest versions) --> <package id="coveralls.io" version="1.3.4" /> <package id="OpenCover" version="4.6.166" /> <!-- for NUnit-lovers --> <package id="NUnit" version="2.6.2" targetFramework="net45" /> <package id="NUnit.Runners" version="2.6.3" /> </packages>
- Write your unit tests
- Register at https://coveralls.io/ and point to your GitHub project
- Coveralls will the tell you your secret token like
repo_token: PlKcHlYUjBpsvFEzSnScYzMDseJi9ASNx
- Do not publish this token, instead encrypt it using https://ci.appveyor.com/tools/encrypt
- Add an
appveyor.yml
to the root of your project. Example configuration:
version: 1.0.{build}
install:
- nuget restore
build:
project: YOURPROJECT.sln
verbosity: detailed
environment:
COVERALLS_REPO_TOKEN:
secure: ybaVTwokoDe5aIFj3RF2Aea5999hmNS7zaLNnSSy0tJkaC+3SJ3MpBbeTVZqF3q+
after_test:
# generate report for NUnit testing framework:
- packages\OpenCover.4.5.3522\OpenCover.Console.exe -register:user -filter:"+[*]*" -target:"packages\NUnit.Runners.2.6.4\tools\nunit-console.exe" -targetargs:"/noshadow /domain:single YOURPROJECT.Tests\bin\debug\YOURPROJECT.Tests.dll" -output:coverage.xml
# generate report for MSTest testing framework:
# - packages\OpenCover.4.5.3522\OpenCover.Console.exe -register:user -filter:"+[*]*" -target:"C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\MSTest.exe" -targetargs:"/testcontainer:YOURPROJECT.Tests/bin/debug/YOURPROJECT.Tests.dll" -output:coverage.xml
- packages\coveralls.io.1.1.86\tools\coveralls.net.exe --opencover coverage.xml
For a more elaborate example look at this project's configuration file appveyor.yml