https://codecov.io/ | @codecov | hello@codecov.io |
---|
-
This uploader supports Windows 7 (x64) and above, Linux (x64), and OS X (x64).
-
Many Codecov CLI options are supported. Run
.\codecov.exe --help
or see CommandLineOptions.cs for more details. -
On windows you can download the exe from NuGet or Chocolatey. There is also the .Net tool called Codecov.Tool which supports all platforms. As an alternative to NuGet or Chocolatey you can download the exe as the asset Codecov-{os}.zip under the release. The following PowerShell (version 5) commands might be helpful.
(New-Object System.Net.WebClient).DownloadFile("<url>", (Join-Path $pwd "Codecov.zip")) # Download Codecov.zip from github release.
Expand-Archive .\Codecov.zip -DestinationPath . # UnZip the file.
.\Codecov\codecov.exe # Run codecov.exe with whatever commands you need.
For a basic use case, in PowerShell run the following commands,
> choco install codecov
> codecov.exe -f <path to coverage report> -t <Codecov upload token>
or using the .NET Core tool
dotnet tool install --global Codecov.Tool
codecov -f <path to coverage report> -t <Codecov upload token>
For an AppVeyor build, the appveyor.yml file would look something like
before_build:
- choco install codecov # Can be changed to dotnet tool install --global Codecov.Tool
test_script:
# Note that, a Codecov upload token is not required.
- codecov -f <path to coverage report>
If you use Cake (C# Make) for your builds, you may be intrested in the Cake.Codecov addin.
The following CI providers are supported:
Company | Supported | Token Required |
---|---|---|
AppVeyor | Yes | Private only |
Azure Pipelines | Yes | Private |
Git | Yes (as a fallback) | Public & Private |
GitHub Actions | Partial (git as fallback) | Public & Private |
Jenkins | Yes | Public & Private |
TeamCity | Yes (See below) | Public & Private |
Travis CI | Yes | Private only |
TeamCity does not automatically make build parameters available as environment variables. You will need to add the following environment parameters to the build configuration. To do this make sure your Branch specification under the VCS Root is configured correctly,
Then set your environment variables,
Note that, the above environment variables (except for env.TEAMCITY_BUILD_URL
) can alternatively be set via the command line,
env.TEAMCITY_BUILD_BRANCH => --branch
env.TEAMCITY_BUILD_ID => --build
env.TEAMCITY_BUILD_COMMIT => --sha
env.TEAMCITY_BUILD_REPOSITORY => --slug
All types of contributions are welcome! Feel free to open an issue or contact us through the gitter channel mentioning either @larzw or @AdmiringWorm.
-
Specifiyng file paths with spaces is currently not possible without a workaround. This is expected to be fixed when a new major release of codecov-exe is released (See issue #71 for possible workaround and tracking).
-
If you're seeing an HTTP 400 error when uploading reports to S3, make sure you've updated to at least version 1.11.0.
To create a relase, please do the following:
- Push the latest changes to the master branch on github
- Navigate to the release page and view the drafted release.
- Make any necessary changes.
- Publish the draft release on GitHub, targeting the master branch.