ggtracker / sc2reader

Extracts gameplay information from Starcraft II replay files
http://pypi.python.org/pypi/sc2reader
MIT License
145 stars 144 forks source link

Add coveralls.io functionality. #72

Open Gusgus01 opened 5 years ago

Gusgus01 commented 5 years ago

As mentioned in: #58

Before we merge this in, @StoicLoofah can you create a coveralls.io account and make sure that your level of access allows you to enable it for this repo?

If you do, it should show up under the repo tab with a switch to turn it on, then we can do the next steps and merge this commit.

It should provide a repo_token on the details page, that repo_token needs to be added to the circleci workflow as an environment variable. COVERALLS_REPO_TOKEN = xxxxxxxxx This can be achieved via the circleci dashboard by editing the workflow (gear next to the workflow name) then going to the Environment Variables tab.

The coveralls.io page also provides a nice embeddable

(I also removed the travis-ci configuration file, since I don't think it's used anymore) I have tested this by creating accounts and doing it for my fork. https://github.com/Gusgus01/sc2reader/pull/3

Gusgus01 commented 5 years ago

The COVERALLS_REPO_TOKEN is needed because it looks like their integrations with circle ci is not the best implemented and has had issues for a long time, travis ci has integration such that the repo is found automatically: https://github.com/lemurheavy/coveralls-public/issues/1018

StoicLoofah commented 5 years ago

@Gusgus01 cool thanks for looking into this! I have the env var set in circleci. let me know if there's anything other config i need to do

image

Gusgus01 commented 5 years ago

I think that was the only config changes I had to make.

StoicLoofah commented 5 years ago

Is there a way to test that it works before I merge it in? will it work if you just make another commit onto this branch?

Gusgus01 commented 5 years ago

Circleci was using the account I made to test instead of ggtracker. Interesting.

I removed them and now it's using the ggtracker/sc2reader workflows. But it's failing with the error saying coveralls can't find the repo. That is the error I ran into when my COVERALLS_REPO_TOKEN was missing or incorrect.

StoicLoofah commented 5 years ago

Hmm, I'm not sure what's up with this. I have been trying to regenerate the token and flipping the env variable, but it isn't working. I'm pretty certain that the COVERALLS_REPO_TOKEN is in there correctly, though it also says it isn't necessary for private repos https://docs.coveralls.io/supported-ci-services

One possible issue is that I'm not actually a member of the ggtracker organization: I just have access to this one repo. @dsjoerg would you mind adding me to see if that fixes it?

Gusgus01 commented 5 years ago

Under the section that says: CIRCLE, JENKINS, SEMAPHORE AND CODESHIP it says it needs the COVERALLS_REPO_TOKEN. Although I believe I saw in an issue on their repo, that they supposedly support auto-detection with CircleCI. But the issue I linked upthread also shows that they seem to have issues with it.

I wasn't too enthralled with coveralls.io, they seem to be lacking documentation. They also don't seem to engage very much on their issue tracker.

I was just doing it since it was an open issue, I usually track test coverage just using coverage on my dev environments :)

cclauss commented 9 months ago

This branch has git conflicts that must be resolved.