Jericho / CakeMail.RestClient

.NET wrapper for the CakeMail API
MIT License
9 stars 3 forks source link

checking out Codecov uploader #22

Closed stevepeak closed 9 years ago

Jericho commented 9 years ago

cat coverage.xml This command simply displays the content of the file (right?) and therefore isn't necessary (right?).

curl https://codecov.io/bash > temp.sh This may or may not work depending on Windows being able to automatically locate 'curl.exe' on the local machine. In my case, curl.exe is present in the 'git For Windows' folder but Windows wasn't able to locate it. I didn't investigate to figure out why, but I'm guessing the location of 'git For Windows' is not in my PATH environment variable.

As an alternative to curl, we should use the following PowerShell command: (New-Object System.Net.WebClient).DownloadFile("https://codecov.io/bash", ".\CodecovUploader.sh")

bash temp.sh this can be replaced with ".\CodecovUploader.sh" (without quotes). Windows will automatically determine the appropriate interpreter for .sh files (which, in my case, is sh.exe bundled with git For Windows) instead of hardcoding "bash" which may or may not be automatically located by Windows.

The uploader Now that you have removed the references to python, I can try to run the uploader. However, I'm getting the following error: image

Maybe it has to do with the fact that I am attempting to run the script interactively as opposed to running it by my CI (AppVeyor)? Maybe it's assuming a given environment variable should be present and I haven't provided it? Anyway, I'm continuing my research but let me know if you have ideas.

stevepeak commented 9 years ago

Thanks @Jericho for jumping in!

I'm curious what is causing that error. But here is the line that likely caused this. Perhaps you can suggest a fix. Otherwise we can skip the error that produces and continue the script

stevepeak commented 9 years ago

Here is a potential fix by skipping the error: https://github.com/codecov/codecov-bash/blob/wip/codecov#L330

You can try this uploader via bash <(curl -s https://raw.githubusercontent.com/codecov/codecov-bash/wip/codecov)

Jericho commented 9 years ago

I don't understand what this line of code is trying to do.

Also, I figured out that your uploader allows to disable the "gcov" feature which avoids the problematic line of code: .\CodecovUploader.sh -t <my token> -X gcov

stevepeak commented 9 years ago

The gcov is used for C and added to the uploader to simplify some customers setup.

I'm glad this is working now!

Jericho commented 9 years ago

I was able to upload my first code coverage file, however I get the following error when I look at the report on Codecov web site: image

stevepeak commented 9 years ago

Inspecting/patching now. Thanks!

stevepeak commented 9 years ago

I fixed that issue. But the reports are not looking accurate, so I'm going to review the created XML and figure out whats going on.

It is attempting to use our partial line coverage feature, but the data does not seem to line up over the lines. Making good progress though!

stevepeak commented 9 years ago

I'm having trouble understanding the coverage.xml output. I'm searching around for some answers but coming up blank.