/coveralls.net

Coveralls uploader for .Net Code coverage

Primary LanguageC#MIT LicenseMIT

coveralls.net

License NuGet NuGet Badges

Coverity Scan Build Status

Source Browser Open Hub Documentation Status

Coveralls uploader for .Net Code coverage of your C# source code. Should work with any code files that get reported with the supported coverage tools, but the primary focus is CSharp.

Branch Appveyor Travis TeamCity AppVeyor Coverage TeamCity Coverage
master AppVeyor Build status Travis Build Status TeamCity Build Status Coverage Status Coverage on TeamCity

Install

The net5.0 way

The dotnet 3.1 way is using the dotnet SDK tools. This can be installed from version 3.0.0. You can use the --version <VERSION> argument with any of these commands to pin to a particular version.

# Install globally: https://docs.microsoft.com/en-us/dotnet/core/tools/global-tools-how-to-use
dotnet tool install --global coveralls.net

# install locally: https://docs.microsoft.com/en-us/dotnet/core/tools/local-tools-how-to-use
dotnet new tool-manifest
dotnet tool install coveralls.net
#restore again later
dotnet tool restore

You can install prerelease versions as well directly from the build feed using the private source provided by appveyor NOTE: this is unstable and probably best limited for early testing only.

# globally
dotnet tool install --global --add-source https://ci.appveyor.com/nuget/coveralls-net-t37a9a9unhwk coveralls.net

# locally
dotnet tool install --add-source https://ci.appveyor.com/nuget/coveralls-net-t37a9a9unhwk coveralls.net

To run the tool after installing:

# Globally
csmacnz.Coveralls

# Locally - don't forget to restore first if necessary
dotnet tool run csmacnz.Coveralls
# or
dotnet csmacnz.Coveralls

The dotnet 3.1 way

The dotnet 3.1 way is using the dotnet SDK tools. This can be installed from version 2.0.0.

# install globally
dotnet tool install --global coveralls.net --version 2.0.0

# install into a local folder
dotnet tool install coveralls.net --version 2.0.0 --tool-path tools

To run the new version, simply use the command:

# if installed globally, this should just be available on your path
csmacnz.Coveralls <args>

# if installed into a tools path, you can run it from there.
.\tools\csmacnz.Coveralls <args>

Haven't got the latest tools? You can still use the new version thanks to the published zip stand-alone app versions. These can be found in GitHub Releases for each platform, window, linux and osx.

For example on windows, you can download and unzip the windows stand-alone version:

# The TLS change was necessary on my development machine
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12

$zipDownloadPath="https://github.com/csMACnz/coveralls.net/releases/download/2.0.0/coveralls.net.2.0.0-windows.zip"
Invoke-WebRequest -UseBasicParsing $zipDownloadPath -OutFile coveralls-windows.zip
mkdir coveralls-windows
Expand-Archive .\coveralls-windows.zip coveralls-windows

.\coveralls-windows\csmacnz.Coveralls.exe

pre dotnet 3.1

If you are not yet on 3.1 you can still use Version 1.0.0 which runs on dotnet 2.1 runtimes and above (using envvar DOTNET_ROLL_FORWARD set to Major for 3.0), following essentially the same instructions as above.

The older old way

Version 0.7.0 is still available on nuget at www.nuget.org/packages/coveralls.net. This is a full .Net Framework exe that even runs on mono.

To install coveralls.net you can find it by searching for coveralls.net in the visual studio nuget extension, or install by running this command in the Package Manager Console.

PM> Install-Package coveralls.net -Version 0.7.0

You can get help for this older version using:

# on windows
csmacnz.Coveralls.exe --help

#on mono
mono csmacnz.Coveralls.exe --help

For more information, checkout the old version readme: https://github.com/csMACnz/coveralls.net/blob/release-0.7.0/README.md

How To Use

Head over to the wiki for user guidance on how it works.

Samples

Sample applications using Coveralls.net to publish their results can be found in the csmacnz/Coveralls.net-Samples Project.

Supported Coverage Formats

Full Supported, In Progress, and Future Support information can be found Coverage Support wiki page

Supported Build Servers

  • Appveyor
  • Travis
  • TeamCity (using custom EnvVars)

Issues

Follow development progress, report bugs and suggest features using github issues (also available at waffle.io)

Follow The App

You can ask questions and get updates using the twitter account coveralls.net (@coverallsdotnet).

Local Development

This app (currently) uses psake to build and test, which is primarily just a wrapper of the dotnet cli for most cases.

If you want to use the full build steps rather than just Visual Studio or dotnet cli:

  • Install psake: choco install -y psake
  • Enable using installed modules locally with Set-ExecutionPolicy RemoteSigned
  • Load psake using Import-Module psake
  • List tasks using Invoke-psake -docs
  • Run build commands using Invoke-psake build or Invoke-psake unit-test (and others)

Contributers

Mark Clearwater (Owner)

Graphs

Throughput of this project (thanks to waffle.io)

Throughput Graph