Closed luisgomes01 closed 1 year ago
Hi @luisgomes01. I see you closed this, but I had a look at your recent successful build and I had a question and a suggestion:
Question: This is what your coverage report (aka. upload) looks like for the successful build (Build 19):
{
"source_files": [...truncated...],
"git": {
"head": {
"id": "HEAD",
"committer_name": "Luís Gomes",
"committer_email": "luis252001@hotmail.com",
"message": "chore: add verbose mode to coveralls",
"author_name": "Luís Gomes",
"author_email": "luis252001@hotmail.com"
},
"branch": "main",
"remotes": [
{
"name": "origin",
"url": "https://github.com/luisgomes01/clean-react.git"
}
]
},
"run_at": "2023-07-26T15:21:31.233Z",
"service_name": "local",
"service_number": "19",
"service_job_id": "606642687",
"service_pull_request": "false",
"repo_token": "eYuVnwMBaRpCfEQzKxmGZ4RR7wMTfThPc"
}
My question is about this part:
"service_name": "local"
Have you only had success, so far, sending from your local development environment?
Or did you mean to leave that value as "local"?
If you're able to send coverage reports from your CI service, which I believe is Travis-CI.com, you'll probably want to change that to:
"service_name": "travis-pro"
That will at least get you nice links back to your CI builds at Travis-CI.com.
Suggestion: I'm guessing you're using the node-coveralls language integration.
In general we always recommend using one of our official integrations, if you can, just because we maintain them and can better support your full tool chain.
Since you're on Travis CI, the official integration you'll want to use is the Coveralls Universal Coverage Reporter (repo). It's a cross-platform binary that's easy to install on Linux, MacOS or Windows, and it supports the coverage report format you're already using (LCOV
) as well as these others. The other advantage is that, even with projects in other languages, you can most likely standardize your Coveralls integrations because of the other formats the Reporter supports.
@afinetooth yes, I am using node-coveralls, the real issue was that I forgot to add that COVERALSS_SERVICE_NAME
variable on travis-ci. I can update the value for "travis-ci" which is the default ( I don't have travis-pro).
I really appreciate your answer and suggestions, thank you so much!
Hi, I am using TravisCI and I have set 2 env variables there: COVERALLS_REPO_TOKEN=my-repo-token COVERALLS_GIT_BRANCH=my-branch
I also turned verbose mode on and seems to be all good:
It's my first time using it and I get no branch information on the site.
I thought that by setting a branch on
COVERALLS_GIT_BRANCH
it would solve my problem but it doesn't. Could anyone please help me with this?