-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Coveralls badge showing coverage unknown #1414
Comments
@afinetooth Any updates about this? I have experienced the same problem. https://coveralls.io/github/benetech/ServiceNetGateway Update: I've managed to solve this. In my case build was only main for feature branch and not for the main branch to which badge was connected. |
Sorry for the delay @Risto-Stevcev. Thanks @kdondziak, yes, that was going to be my first question, @Risto-Stevcev, whether you had submitted at least one build against your default branch. In your case, it looks like you have, although I'm seeing something I haven't seen before, which is that we can't identify the branches for any of your builds. Note your recent builds table: Also not seeing a CI service (under VIA). Can you please explain how you've set up your project to post coverage results to coveralls? I see a My first recommendation would be to post to coveralls from CI, and call Thanks, |
Hi @afinetooth , |
Hi @Risto-Stevcev, It should be generally possible to post coverage results from your local machine and to use the badge that way. However, the README for your integration library, Bisect_ppx (our community-created OCaml integration library) only describes use cases for Travis CI, CircleCI and Github Actions. I don't see why the same procedures should not work from your local development environment, but it may be a matter of changing the file structure or making different calls from the command line. Have you inquired in that project about how to call coveralls from your local dev env? The issue is making sure your POSTs to our API are correct, in that we're receiving all required info and it's correct. Are you able to send me the curl commands, or otherwise some log of the full request you're sending to https://coveralls.io/api/v1/jobs? Since we expect to receive POSTs to /jobs from CI, this makes me think you'll need to provide the If you prefer to keep your info private, email us at support@coveralls.io and just reference this issue. |
It was a while back, but from what I remember the reason why I didn't want to set up CI for coveralls was due to the permissions it asks for Github -- it was either the ability to write to the repo or to write to all of my repos. I wasn't sure why it would even be needed this since I was posting the coveralls data manually from my local without providing any write permissions. I'm not sure if this was for Coveralls or Travis This is what it's sending: I'll post a bit later today what entries in the json it's sending specifically |
This is structure of the {
"repo_token": "foo",
"source_files": [
{
"name": "bastet/src/Dual.re",
"source_digest": "5aae0a60ef729d60b812ad3687e21efb",
"coverage": [null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,0,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,0,null,null,null,null,0,0,null,null,null,null,0,null,null,null,null,null,32,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,0,0,null,null,0,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,0,null,0,null,null,null,0,null,0,null,null,null,null,null,null,null]
},
...
]
} |
Commands look correct. Only one more required value missing from that POST body, which is Can you try sending?:
Also, try calling coveralls in verbose mode. That will add some debug output to stdout and give us insight into exactly what you're sending and how the API is responding. Looks like it can be set with bisect_ppx here: |
How do I run verbose mode? I'm just using the API: This is the output with the
|
@Risto-Stevcev based on that API response you will need to make sure your repo_token is part of the JSON in your Apologies, verbose mode is not available for cURL, only for specific integrations. It's the integrations that display the debug output on what they're packaging up to POST to our API. |
This is what I'm getting with curl's verbose mode:
|
@Risto-Stevcev that response indicates success in that it includes a Job URL matching the (new) job you just created (cURL status: 200 OK):
You can see the report for the job at: And for the associated build at: The coverage badge still shows Note that you are not passing branch data with your builds (the BRANCH field reads (?) for each build here): At this point, you'll want to make sure you're supplying info for the Example:
That |
Thanks that worked. It sounds like this is expected behavior -- Is it possible to add a note in the API docs about this? I'll try to get travis fully setup but it's a bit of a headache with the current setup |
@Risto-Stevcev happy to hear it. That is the expected behavior. Good suggestion on the doc update. I added the following note to the API Reference:
Submitted a PR. It should appear here in the next 24-48 hrs. Closing this issue for now. We can re-open if necessary. |
https://coveralls.io/github/Risto-Stevcev/bastet
The text was updated successfully, but these errors were encountered: