macmade / xcode-coveralls

coveralls.io support for Xcode
http://macmade.github.io/xcode-coveralls
22 stars 3 forks source link

Branch name is not being reported in TravisCI #3

Closed guidomb closed 8 years ago

guidomb commented 9 years ago

I thought that something was wrong with Coveralls because the badge was not working. I contacted them and they told me that the tool I was using to report the coverage wasn't reporting the branch name. I configure xcode-coveralls in verbose mode in travis and I realized that the branch name was not being set in the JSON payload. When I run it locally it works.

macmade commented 9 years ago

Thanks for the report.

Are you sure you are using the latest version? I'm using xcode-coveralls for my other projects on Travis, and the branch name is correctly reported. For instance: https://coveralls.io/github/macmade/CFPP

Is your repository public? And if so, can you provide me with a link to the Travis build and report on coveralls.io?

guidomb commented 9 years ago

Unfortunaly the repo is not public. I am using a script that install xcode-coveralls using homebrew. Maybe the version installed by homebrew is not the latest one.

— Sent from Mailbox

On Wed, Jul 22, 2015 at 5:48 AM, Jean-David Gadina notifications@github.com wrote:

Thanks for the report. Are you sure you are using the latest version? I'm using xcode-coveralls for my other projects on Travis, and the branch name is correctly reported. For instance: https://coveralls.io/github/macmade/CFPP

Is your repository public? And if so, can you provide me with a link to the Travis build and report on coveralls.io?

Reply to this email directly or view it on GitHub: https://github.com/macmade/xcode-coveralls/issues/3#issuecomment-123621454

macmade commented 9 years ago

The homebrew version is the latest one. The issue is certainly because the repository is not public.

I'm going to see if I can add the branch name in the generated JSON.

guidomb commented 9 years ago

I thought the branch name was added to the JSON that is posted to coveralls here. Because if I run xcode-coveralls locally with -v a JSON is printed (I assumed is the one that will be posted to coveralls) and the branch name appears. Why do you think is an issue due to being a private repo?

guidomb commented 9 years ago

This is the git part of the JSON output in Travis when running xcode-coveralls -v

"git" : {
    "head" : {
      "author_name" : "Guido Marucci Blas",
      "id" : "d117b668968c7432729654ad431f545938f24a94",
      "committer_name" : "Guido Marucci Blas",
      "committer_email" : "guidomb@gmail.com",
      "author_email" : "guidomb@gmail.com",
      "message" : "Fixes how installed formula version is extracted.\n"
    },
    "remotes" : [
      {
        "name" : "origin",
        "url" : "git@github.com:MY_PRIVATE_REPO"
      }
    ]
  }
macmade commented 9 years ago

Since you have the list of remotes in the JSON output, the problem is git_reference_is_branch returning falsefor some reason.

That being said, the check seems unnecessary.

I just published version 0.1.1 which should fix the issue. It's available on my homebrew tap: https://github.com/macmade/homebrew-tap

Can you please confirm the branch name is now reported?

guidomb commented 9 years ago

Coveralls is super slow today. The last 10 pushes from my repo haven't been processed yet but I added the --verbose flag and in Travis I realized the JSON that is being printed doesn't contain a git object like the one I posted before. Why is this?

guidomb commented 9 years ago

I've just check the output when I run it locally and the git object appears in the JSON. The new version, 0.1.1 changed something that makes the entire git object to not being included in the final JSON.

macmade commented 9 years ago

I just pushed version 0.1.2, which reverts changes in 0.1.1 and adds debugging info for GIT when using verbose mode.

Look for GIT error in the output... Hopefully we'll be able to see what's wrong with the branch name.

guidomb commented 9 years ago

Thanks! Just to let you know Coveralls is in maintenance mode. As soon as the service gets restored I let you know was the error message is.

guidomb commented 9 years ago

Well finally coveralls is working again. The error message is

GIT error (-1): unable to retrieve the branch name

    - Reference 'HEAD' is neither a local nor a remote branch.
macmade commented 9 years ago

I'm currently in holiday. I'll check this ASAP...

guidomb commented 9 years ago

@macmade Did you have any chance to take a look a this? Can I help you somehow?