HealthCatalyst / healthcareai-py

Python tools for healthcare machine learning
http://healthcare.ai
MIT License
314 stars 188 forks source link

Code coverage service: CI integration #345

Open Aylr opened 7 years ago

Aylr commented 7 years ago

@mxlei01 Would you take this on once #344 is complete?

mxlei01 commented 7 years ago

I can change the travis.yml file, however, this will require to setup secrets in the coveralls repo, and the travis as well. I would need access to coveralls and travis, which is not possible.

I can show you where to get the coveralls repo ID, and you can set them on travis.

Aylr commented 7 years ago

Excellent. Your guidance would be helpful.

mxlei01 commented 7 years ago

image

You can see on the top right this is your coveralls repo token. You would need to login, then you would be able to see the repo key.

image

Then in travis you would need to add the key as an environmental variable. This is located in the settings for travis.

When travis executes this command:

nosetests --exe -c ../.noserc --with-coverage --cover-inclusive --cover-tests --cover-package=. unit_tests && COVERALLS_REPO_TOKEN=<COVERALLS_REPO_TOKEN> TRAVIS_BRANCH=master BRANCH=master coveralls --rcfile=../.coveragerc

It will update the code coverage on the coveralls website, and also the badge on the repo.