Cake.Codecov 3.0.0

dotnet add package Cake.Codecov --version 3.0.0                
NuGet\Install-Package Cake.Codecov -Version 3.0.0                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Cake.Codecov" Version="3.0.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Cake.Codecov --version 3.0.0                
#r "nuget: Cake.Codecov, 3.0.0"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#addin nuget:?package=Cake.Codecov&version=3.0.0                

Cake.Codecov

All Contributors AppVeyor branch GitHub Build NuGet Codecov

A Cake addin that extends Cake with the ability to use the official Codecov CLI that have been repackaged as a NuGet package named CodecovUploader.

Table of Contents

Usage

In order to use this addin, add to your Cake script

#tool nuget:?package=CodecovUploader
#addin nuget:?package=Cake.Codecov // Any versions before 1.1.0 is not guaranteed to work anymore.

Then use one of the following snippets to upload your coverage report to Codecov.

Task("Upload-Coverage")
    .Does(() =>
{
    // Upload a coverage report.
    Codecov("coverage.xml");
});
Task("Upload-Coverage")
    .Does(() =>
{
    // Upload coverage reports.
    Codecov(new[] { "coverage1.xml", "coverage2.xml" });
});
Task("Upload-Coverage")
    .Does(() =>
{
    // Upload a coverage report by providing the Codecov upload token.
    Codecov("coverage.xml", "00000000-0000-0000-0000-000000000000");
});
Task("Upload-Coverage")
    .Does(() =>
{
    // Upload coverage reports by providing the Codecov upload token.
    Codecov(new[] { "coverage1.xml", "coverage2.xml" }, "00000000-0000-0000-0000-000000000000");
});
Task("Upload-Coverage")
    .Does(() =>
{
    // Upload a coverage report using the CodecovSettings.
    Codecov(new CodecovSettings {
        Files = new[] { "coverage.xml" },
        Token = "00000000-0000-0000-0000-000000000000",
        Flags = "ut"
    });
});

Documentation

Documentation for the addin can be found on the Cake Website.

Codecov Tips

  1. While CI Service like GitHub Action, these workflows are likely to hit a rate limit on Codecov. As such it is recommended to always pass in a repository or global token when one is available.
  2. Do not set NonZero to true when running without a Codecov token.

Questions

Feel free to open an issue or ask a question in GitHub Discussions under the Extension Q&A category, and by tagging us: @larzw and/or @AdmiringWorm.

Known Issues

  • Coverage report upload fails when using gitversion (or other tools that change the appveyor build version) Workaround: Add the following in your Upload Coverage task (only needed if gitversion is run on the same call as the uploading of coverage reports in appveyor.yml)

    Task("Upload-Coverage")
        .Does(() =>
    {
        // The logic may differ from what you actually need.
        // This way is for the use with GitVersion.
        // Basically, the buildVersion format needs to be exactly the
        // same as the build version shown on appveyor when the build is done.
        var buildVersion = string.Format("{0}.build.{1}",
            variableThatStores_GitVersion_FullSemVer,
            BuildSystem.AppVeyor.Environment.Build.Number
        );
        var settings = new CodecovSettings {
            Files = new[] { "coverage.xml" },
            EnvironmentVariables = new Dictionary<string,string> { { "APPVEYOR_BUILD_VERSION", buildVersion } }
        };
        Codecov(settings);
    });
    

Contributors

Thanks goes to these wonderful people (emoji key):

<table> <tbody> <tr> <td align="center" valign="top" width="14.28%"><a href="https://www.linkedin.com/in/larz-white-5a8264108"><img src="https://avatars0.githubusercontent.com/u/6298611?v=4?s=100" width="100px;" alt="Larz White"/><br /><sub><b>Larz White</b></sub></a><br /><a href="#maintenance-larzw" title="Maintenance">🚧</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/AdmiringWorm"><img src="https://avatars3.githubusercontent.com/u/1474648?v=4?s=100" width="100px;" alt="Kim J. Nordmo"/><br /><sub><b>Kim J. Nordmo</b></sub></a><br /><a href="#maintenance-AdmiringWorm" title="Maintenance">🚧</a></td> <td align="center" valign="top" width="14.28%"><a href="http://www.gep13.co.uk/blog"><img src="https://avatars3.githubusercontent.com/u/1271146?v=4?s=100" width="100px;" alt="Gary Ewan Park"/><br /><sub><b>Gary Ewan Park</b></sub></a><br /><a href="https://github.com/cake-contrib/Cake.Codecov/pulls?q=is%3Apr+reviewed-by%3Agep13" title="Reviewed Pull Requests">👀</a> <a href="https://github.com/cake-contrib/Cake.Codecov/issues?q=author%3Agep13" title="Ideas, Planning, & Feedback">🤔</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/vkbishnoi"><img src="https://avatars0.githubusercontent.com/u/8297727?v=4?s=100" width="100px;" alt="Vishal Bishnoi"/><br /><sub><b>Vishal Bishnoi</b></sub></a><br /><a href="https://github.com/cake-contrib/Cake.Codecov/commits?author=vkbishnoi" title="Code">💻</a></td> <td align="center" valign="top" width="14.28%"><a href="https://twitter.com/hereispascal"><img src="https://avatars1.githubusercontent.com/u/2190718?v=4?s=100" width="100px;" alt="Pascal Berger"/><br /><sub><b>Pascal Berger</b></sub></a><br /><a href="https://github.com/cake-contrib/Cake.Codecov/issues?q=author%3Apascalberger" title="Ideas, Planning, & Feedback">🤔</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/twenzel"><img src="https://avatars2.githubusercontent.com/u/500376?v=4?s=100" width="100px;" alt="Toni Wenzel"/><br /><sub><b>Toni Wenzel</b></sub></a><br /><a href="https://github.com/cake-contrib/Cake.Codecov/issues?q=author%3Atwenzel" title="Ideas, Planning, & Feedback">🤔</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/Jericho"><img src="https://avatars0.githubusercontent.com/u/112710?v=4?s=100" width="100px;" alt="jericho"/><br /><sub><b>jericho</b></sub></a><br /><a href="https://github.com/cake-contrib/Cake.Codecov/issues?q=author%3AJericho" title="Ideas, Planning, & Feedback">🤔</a></td> </tr> <tr> <td align="center" valign="top" width="14.28%"><a href="https://github.com/gitfool"><img src="https://avatars2.githubusercontent.com/u/750121?v=4?s=100" width="100px;" alt="Sean Fausett"/><br /><sub><b>Sean Fausett</b></sub></a><br /><a href="https://github.com/cake-contrib/Cake.Codecov/commits?author=gitfool" title="Code">💻</a></td> <td align="center" valign="top" width="14.28%"><a href="https://augustoproiete.net"><img src="https://avatars.githubusercontent.com/u/177608?v=4?s=100" width="100px;" alt="C. Augusto Proiete"/><br /><sub><b>C. Augusto Proiete</b></sub></a><br /><a href="https://github.com/cake-contrib/Cake.Codecov/commits?author=augustoproiete" title="Documentation">📖</a> <a href="https://github.com/cake-contrib/Cake.Codecov/issues?q=author%3Aaugustoproiete" title="Ideas, Planning, & Feedback">🤔</a></td> <td align="center" valign="top" width="14.28%"><a href="https://blog.nils-andresen.de"><img src="https://avatars.githubusercontent.com/u/349188?v=4?s=100" width="100px;" alt="Nils Andresen"/><br /><sub><b>Nils Andresen</b></sub></a><br /><a href="https://github.com/cake-contrib/Cake.Codecov/commits?author=nils-a" title="Code">💻</a></td> </tr> </tbody> </table>

This project follows the all-contributors specification. Contributions of any kind welcome!

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net6.0

    • No dependencies.
  • net7.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories (1)

Showing the top 1 popular GitHub repositories that depend on Cake.Codecov:

Repository Stars
GitTools/GitVersion
From git log to SemVer in no time
Version Downloads Last updated
3.0.0 3,045 5/6/2024
2.0.0 1,366 5/6/2024
1.1.0 215 5/4/2024
1.0.1 172,131 3/26/2021
1.0.0 4,500 2/13/2021
0.9.1 40,578 7/11/2020
0.9.0 1,307 7/8/2020
0.8.0 73,099 1/9/2020
0.7.0 14,513 8/3/2019
0.6.0 113,035 4/26/2019
0.5.0 44,285 12/13/2018
0.4.0 14,932 3/23/2018
0.3.0 7,397 10/23/2017
0.2.1 4,372 6/30/2017
0.2.0 4,917 5/26/2017
0.1.0 1,135 5/26/2017

All release notes for Cake.Codecov can be found on the GitHub site - https://github.com/cake-contrib/Cake.Codecov/releases/tag/3.0.0.