Add unittesting support to .codeclimate.yml#471
Conversation
Codecov Report
@@ Coverage Diff @@
## master #471 +/- ##
=====================================
Coverage 83% 83%
=====================================
Files 30 30
Lines 1024 1024
Branches 160 160
=====================================
Hits 850 850
Misses 84 84
Partials 90 90Continue to review full report at Codecov.
|
|
What do we need to do for the token? |
|
@mbernier We have to generate it |
|
@mbernier For an organization-owned repository, one must be in an organization's Owners group to generate the token. Alternatively, we can add Open Source Repo but for that one must have GitHub-rights to administer the repository. |
|
@mbernier Unfortunately, codeclimate.com is under maintenance. So can't do anything. |
|
Ahh, ok - I got confused with the codecov stuff here. I will make sure to get the code and add it to our Travis environment. Can you please update the config to pull a CODE_CLIMATE_TOKEN variable from the travis environment? |
|
@mbernier update the code to pull CODE_CLIMATE_TOKEN variable from the travis env |
|
Perfect! As soon as I can get into CodeClimate I will get this merged in. Thanks!! |
|
I have added the token to travis! Let's run this thing one more time - merging master to cause that. |
|
One more merge to try to get codeclimate to see our tests! |
| - if [[ $TRAVIS_PYTHON_VERSION == '2.6' ]]; then coverage run -m unittest2 discover; else coverage run -m unittest discover; fi | ||
| after_script: | ||
| - codecov | ||
| - ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT |
There was a problem hiding this comment.
@prashuchaudhary it looks like there's an issue:
$ ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
ERRO[0000] failed to read file __init__.py
open __init__.py: no such file or directory
Error: open __init__.py: no such file or directory
Usage:
cc-test-reporter after-build [flags]
Flags:
-s, --batch-size int batch size for source files (default 500)
-e, --coverage-endpoint string endpoint to upload coverage information to (default "https://api.codeclimate.com/v1/test_reports")
-t, --coverage-input-type string type of input source to use [simplecov, lcov, coverage.py, clover, gocov, gcov, cobertura, jacoco]
--exit-code int exit code of the test run
-r, --id string reporter identifier
-p, --prefix string the root directory where the coverage analysis was performed (default "/home/travis/build/sendgrid/sendgrid-python")
Global Flags:
-d, --debug run in debug mode
There was a problem hiding this comment.
will check and update
There was a problem hiding this comment.
@prashuchaudhary please let me know when you get a chance to look at this and I will loop back around.
saving the code climate result in $? in shell parameter.
closes #465