Code Monkey home page Code Monkey logo

coveralls.net's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

coveralls.net's Issues

git parameters through command line

As a user who wants to run coveralls.net I want to be able to provide the git data as input parameters on the command line so that I can have these set correctly when the results are sent to coveralls.io.

  • Git commit hash is provided as an input parameter
  • Git commit message is provided as an input parameter
  • Git branch name is provided as an input parameter
  • Git commit user name is provided as an input parameter
  • Git commit user email is provided as an input parameter

Add -o --output parameter to save the json results to an output file

As a user I want to trial run the app and look at the json that will be sent to coveralls.io so that I can verify what gets sent is what I expected.

Add a -o/--output parameter to match the input parameter, that saves the json payload to that file when provided. Expected to be used with a --dryrun paramater so the results are saved but not published.

multiple jobs causes issues - service_job_id

https://coveralls.io/github/csMACnz/Coveralls.net-Samples?branch=core-xunit-coverlet-appveyor

files from different jobs show up against the same result. The code should be fetching and providing this:

https://github.com/csMACnz/coveralls.net/blob/release-1.0.0/src/csmacnz.Coveralls/CoverageMetadataResolver.cs#L51

but on coveralls the results are merged.

  • is the value being output into the json?
  • is it in the right place in the json?
  • is the value valid?

Add Option to ignore ssl certificate erros

Add an option to ignore ssl certificate errors when posting to coveralls api.

In Program.cs

var handler = new WebRequestHandler();
if (args.IsProvided("--ignoreCertErrors") && args.OptIgnoreCertErrors)
{
    handler.ServerCertificateValidationCallback += (sender, cert, chain, sslPolicyErrors) => true;
}
var uploadResult = new CoverallsService().Upload(fileData, handler);

In CoverallsService.cs

public Result<bool, string> Upload(string fileData, WebRequestHandler handler)
{
    using (HttpContent stringContent = new StringContent(fileData))
    {
        using (var client = new HttpClient(handler))
        using (var formData = new MultipartFormDataContent())
        {
            formData.Add(stringContent, "json_file", "coverage.json");

            var response = client.PostAsync(RequestUri, formData).Result;

            if (!response.IsSuccessStatusCode)
            {
                var content = response.Content.ReadAsStringAsync().Result;
                var message = TryGetJsonMessageFromResponse(content).ValueOr(content);

                if (message.Length > 200)
                {
                    message = message.Substring(0, 200);
                }

                return string.Format("{0} - {1}", response.StatusCode, message);
            }
            return true;
        }
    }
}

New Option in T4DocoptNet.cs

public bool OptIgnoreCertErrors { get { return _args["--ignoreCertErrors"].IsTrue; } }

Source files optional

(String) source
Optional (Required for Manual repos on Enterprise)
The contents of the source file.

Because this isn't required when the source is on GitHub, this should probably be configurable to not require the files (if on GitHub). I think the better option is to not send the files, unless send files is provided. This would be a breaking change though.

Support multiple files

Consider the following scenario: a user wants to send multiple coverage files to coveralls website from a single command line run.
Feature proposal: add --folder flag.
This flag will receive a folder as input.
The code will take all the files in that folder and parse them according to file extensions.
file.opencover.xml (or file.opencover haven't decided yet) will be parsed as open cover
file.chuzpah.json (or file.chutzpah) will be parsed as chutzpah
file.lcov will be parsed as lcov (pending implementation of lcov format).

I'm not entirely familiar with the other options but I think that there's an option now that uses a folder which may use the same mechanism.

As a part of this changes I really think it would be wise to add an IoC container and some folders to split the logic into business logic and data access.
The current state doesn't really support unit testing well as far as I could see.

Also I think that the parsers should receive a file path and they should all inherit from the same interface.

What do you think?

Use Visual Studio coverage on own builds

As a progress tracker of the project I want to see coverage of coveralls.net run by the visual studio coverage tool as well as opencover so that the app is truly dog-fooding.

linux conversion of drive path

As a coveralls user I want my windows fake linux paths to not include the : in the "C:" drive portion of my path so that it looks more linux-ey

input: c:\home\test
output /c/home/test

Relative source file paths in coveralls.io

As a user with different build servers on different branches, I want source paths to be made relative to the repository root path so that I can see the source regardless of what the original path on the build server was.

Acceptance criteria:

  • On a Travis CI branch, the source paths are relative to the root of the repository
  • On an AppVeyor Branch, the source paths are relative to the root of the repository
  • a flag is used to determine to use the relative path mode, full path mode will be the default.

Ascii Art

As a product owner i want to see ascii art when someone runs the console app so that people see it when reading the output

  • add ascii art print on startup
  • add --noascii option so not annoying

Handle Pull Request Builds

As a repository owner, I want to see coveralls.net results from Pull Request builds so that I can check coverage stats have not decreased from a PR change.

Pull Requests do not currently build using the same calling code from AppVeyor. The application might need to be away of pull request builds to publish correctly.

Support auto-property coverage mapping with openCover

Property coverage from auto-properties does not get mapped back to source code with opencover results.

As a user when I run coverage over my autoproperties, then properties get correctly highlighted in the coverage report so that I can accurately map my coverage percentages over these properties.

--basePath Command-Line Argument Is Ignored

The value of the --basePath argument is never used because the private member field is checked for not being null instead of the constructor argument for PathProcessor. Because of this the specified value is always thought to be null and is consequently never used.

Support Lcov format

here is an example of this format, I saw it when looking into possible alternatives, I think it's in use in some cases, chutzpah is one of them and I think there are more, I'll see if I can send a pull request to add it.
coverage-chutzpah.txt

support "parallel"

if anyone is using this with the webhook, I want to be able to support that use case.

Later, this could be able to post the webhook for you as well.

Support SharpCover

As a SharpCover coverage user, I want to be able to publish my coverage results to coveralls.io so that I can monitor my coverage results over time.

Job Id and repo token provided as CLI parameters

As a user who wants to run coveralls.net I want to be able to provide the coveralls.io repo token and jobId data as input parameters on the command line so that I can have these set correctly when the results are sent to coveralls.io.

  • coverall.io repo specific token is provided as an input parameter
  • buildserver jobId is (optionally) provided as an input parameter

coveralls.net sometimes fails with "Usage" message

We're using coveralls.net to upload our OpenCover coverage data to Coveralls via an AppVeyor build. However, sometimes this fails for reasons I do not understand. For instance, currently it does not work (most of the time, it worked "the next day", but it now consistently failed for a couple of days already). Here's some output of our AppVeyor build - invocation of coveralls.net:

& $coveralls --opencover -i OpenCover_CoverageData.xml --repoToken $env:COVERALLS_REPO_TOKEN --commitId $env:APPVEYOR_REPO_COMMIT --commitBranch $env:APPVEYOR_REPO_BRANCH --commitAuthor $env:APPVEYOR_REPO_COMMIT_AUTHOR --commitEmail $env:APPVEYOR_REPO_COMMIT_AUTHOR_EMAIL --commitMessage $env:APPVEYOR_REPO_COMMIT_MESSAGE --jobId $env:APPVEYOR_JOB_ID --serviceName AppVeyor

coveralls.net output:

Usage:
csmacnz.Coveralls (--opencover | --dynamiccodecoverage | --monocov) -i ./opencovertests.xml (--repoToken <repoToken> | [--repoTokenVariable <repoTokenVariable>]) [-o ./opencovertests.json] [--dryrun] [--useRelativePaths [--base Path <path>] ] [--commitId <commitId> --commitBranch <commitBranch> [--commitAuthor <commitAuthor> --commitEmail <commitEmail> --commitMessage <commitMessage>] ] [--jobId <jobId>] [--serviceName <Name>] [--treatUploadErrorsAsWarnings]
csmacnz.Coveralls --version
csmacnz.Coveralls --help

Since we have not changed invocation of coveralls.net (see e.g. this build), I'm pretty sure that the problem is not a "usage" problem.

Here's our latest (and failing) build and the appveyor.yml.

Is this a coveralls.io issue (e.g., is their web service not available at times)? Or is this even an AppVeyor issue (e.g., some env variables are not bound to their correct values, thus causing the "Usage" output of coveralls.net)? How can I debug the actual cause of the problem?

Thanks in advance!

Edited: Forgot to mention that we are using coveralls.net v0.6

Support dotCover

As a Jetbrains dotcover coverage user, I want to be able to publish my dotcover results to coveralls.io so that i can monitor my coverage results over time.

Support NCover

As an NCover coverage user, I want to be able to publish my NCover results to coveralls.io so that i can monitor my coverage results over time.

TeamCity Git Data Resolver

Would be nice to have a class TeamCityGitDataResolver : IGitDataResolver

For example, when the Codecov.io bash script is ran in a teamcity build step, the following output is given:

[19:08:41]	[Step 4/5] ==> TeamCity CI detected.
[19:08:41]	[Step 4/5]     Teamcity does not automatically make build parameters available as environment variables.
[19:08:41]	[Step 4/5]     Add the following environment parameters to the build configuration
[19:08:41]	[Step 4/5]     env.TEAMCITY_BUILD_BRANCH = %teamcity.build.branch%
[19:08:41]	[Step 4/5]     env.TEAMCITY_BUILD_ID = %teamcity.build.id%
[19:08:41]	[Step 4/5]     env.TEAMCITY_BUILD_URL = %teamcity.serverUrl%/viewLog.html?buildId=%teamcity.build.id%
[19:08:41]	[Step 4/5]     env.TEAMCITY_BUILD_COMMIT = %system.build.vcs.number%
[19:08:41]	[Step 4/5]     env.TEAMCITY_BUILD_REPOSITORY = %vcsroot.<YOUR TEAMCITY VCS NAME>.url%

Then after following the instructions, it proceeds to work as expected.

Could this project implement a similar way? Thoughts?

I may attempt to implement this if reasonable. Would appreciate any insight.

Replace argument parser

The error messaging from the argument parser isn't very good.
if you have --repoToken -o output.xml (ie missing token value) it tries to parse the -o as the value, then fails with a usage error when it tries to process output.xml as valid.

Lets replace with a new library
http://stackoverflow.com/questions/491595/best-way-to-parse-command-line-arguments-in-c
http://blog.simontimms.com/2014/07/09/parsing-command-line-arguments-in-c/

too many options:

Nuget Package Icon

As a nuget user I want to see that the package has its own icon so that I know it is more important than the others.

travis + monocov + public repo

command line syntax not clear:
installing version 0.6.0
command executed :

mono ./testrunner/coveralls.net.0.6.0/tools/csmacnz.Coveralls.exe --monocov -i ./monocovCoverage --commitId $TRAVIS_COMMIT --commitBranch $TRAVIS_BRANCH --commitAuthor "$REPO_COMMIT_AUTHOR" --commitEmail "$REPO_COMMIT_AUTHOR_EMAIL" --commitMessage "$REPO_COMMIT_MESSAGE" --jobId $TRAVIS_JOB_ID  --serviceName "travis-ci"  --useRelativePaths

No token found in Environment Variable 'COVERALLS_REPO_TOKEN'.

how do you go with a public repo without leaking the coveralls token?
Apparently Coveralls.io does not need repo token when submitting coverage for public repositories. reference : lemurheavy/coveralls-public#208

Application crashes when --commitEmail flag is not supplied

When all flag are in their correct place and all the data is present except --commitEmail, the application crashes (ran it from powershell) using latest stable Nuget package:

PS> Invoke-Expression $cmd
output file 'cov.json' already exists and will be overwritten.

Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object.
   at csmacnz.Coveralls.MainArgs.get_OptCommitemail() in c:\projects\coveralls-net\src\csmacnz.Coveralls\T4DocoptNet.cs:
line 84
   at csmacnz.Coveralls.CommandLineGitDataResolver.GenerateData() in c:\projects\coveralls-net\src\csmacnz.Coveralls\Com
mandLineGitDataResolver.cs:line 26
   at csmacnz.Coveralls.Program.<ResolveGitData>b__d(IGitDataResolver p) in c:\projects\coveralls-net\src\csmacnz.Covera
lls\Program.cs:line 182
   at System.Linq.Enumerable.WhereSelectListIterator`2.MoveNext()
   at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1 source)
   at csmacnz.Coveralls.Program.ResolveGitData(MainArgs args) in c:\projects\coveralls-net\src\csmacnz.Coveralls\Program
.cs:line 182
   at csmacnz.Coveralls.Program.Main(String[] argv) in c:\projects\coveralls-net\src\csmacnz.Coveralls\Program.cs:line 1
18

Support XR-Baboon

As a XR-Baboon coverage user, I want to be able to publish my coverage results to coveralls.io so that I can monitor my coverage results over time.

Appveyor server data resolver

Automagically resolve service name, job id, service number etc when detected running on appveyor. So you don't have to declare them.

Build numbers

I would like the coveralls build number to match the one created by AppVeyor. I tried setting the --JobId, like this

packages\coveralls.net.0.6.0\tools\csmacnz.coveralls.exe --opencover -i ./coverage.xml 
   --jobId %APPVEYOR_BUILD_NUMBER%

but it did't work. Here's the yml.

Add Icon to application

I want to see the application's icon in the filesystem so that the app looks more complete.

--dryrun option to run without publishing to coveralls.io

As an integration test I want to run the app multiple times with various inputs without publishing to coveralls.io so that I can avoid having test data in my coveralls.io stats.

Add a --dryrun parameter to the console app, that when provided, skips the publishing of the results.

Unable to Upload to Coveralls.io from AppVeyor

Hi,

Since days I've been trying to upload the results of coverage from opencover to coveralls.io using coveralls.net.
I've tried several configurations, and finally I ended it to this

$opencoverPath = "user"
 If ($platform -eq "x86") {
       $opencoverPath = "Path32"
   } ElseIf ($platform -eq "x64") {
       $opencoverPath = "Path64"
   }

     Write-Host "Producing Coverage"

    $opencover = (Resolve-Path "src/packages/OpenCover.*/tools/OpenCover.Console.exe").ToString()
    $nunit = (Resolve-Path "src/packages/NUnit.Runners.*/tools/$nunitapp").ToString()
    & $opencover -register:$opecoverPath -target:"$nunit" -targetargs:"$root\src\deveeldb-nunit\bin\$platform\$conf\deveeldb-nunit.dll /noshadow /domain:single" -output:"$root\dist\$platform\coverage.xml"

     Write-Host "Sending Coverage results to Coveralls.io"

     $coveralls = (Resolve-Path "src/packages/coveralls.net.*/tools/csmacnz.coveralls.exe").ToString()
     & $coveralls --opencover -i "$root\dist\$platform\coverage.xml" --repoToken $COVERALLS_REPO_TOKEN --jobId $env:APPVEYOR_BUILD_NUMBER --serviceName appveyor

While the other configurations were giving me errors when trying to invoke coveralls.net, this one only prints out the usage, such as if the parameters passed were wrong.

Can you please verify if anything there is wrong?

Package available on nuget

As a .Net developer with a github project who wants coverage on coveralls.io I want to be able to install the csmacnz.coveralls.exe from a nuget package so that I can have it available on my build servers, which will publish the results to coveralls.io

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.