Skip to content

Add unittesting support to .codeclimate.yml#471

Closed
prashuchaudhary wants to merge 5 commits into
sendgrid:masterfrom
prashuchaudhary:master
Closed

Add unittesting support to .codeclimate.yml#471
prashuchaudhary wants to merge 5 commits into
sendgrid:masterfrom
prashuchaudhary:master

Conversation

@prashuchaudhary

Copy link
Copy Markdown
Contributor

closes #465

@thinkingserious thinkingserious added the status: code review request requesting a community code review or review from Twilio label Oct 28, 2017
@SendGridDX

SendGridDX commented Oct 28, 2017

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@thinkingserious thinkingserious added difficulty: easy fix is easy in difficulty hacktoberfest labels Oct 28, 2017
@codecov-io

codecov-io commented Oct 28, 2017

Copy link
Copy Markdown

Codecov Report

Merging #471 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #471   +/-   ##
=====================================
  Coverage      83%    83%           
=====================================
  Files          30     30           
  Lines        1024   1024           
  Branches      160    160           
=====================================
  Hits          850    850           
  Misses         84     84           
  Partials       90     90

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3283c27...f94f5af. Read the comment docs.

@mbernier

Copy link
Copy Markdown
Contributor

What do we need to do for the token?

@prashuchaudhary

Copy link
Copy Markdown
Contributor Author

@mbernier We have to generate it

@prashuchaudhary

Copy link
Copy Markdown
Contributor Author

@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.

@prashuchaudhary

Copy link
Copy Markdown
Contributor Author

@mbernier Unfortunately, codeclimate.com is under maintenance. So can't do anything.

@mbernier

Copy link
Copy Markdown
Contributor

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?

@prashuchaudhary

Copy link
Copy Markdown
Contributor Author

@mbernier update the code to pull CODE_CLIMATE_TOKEN variable from the travis env

@mbernier

mbernier commented Oct 28, 2017

Copy link
Copy Markdown
Contributor

Perfect! As soon as I can get into CodeClimate I will get this merged in. Thanks!!

@mbernier

Copy link
Copy Markdown
Contributor

I have added the token to travis! Let's run this thing one more time - merging master to cause that.

@mbernier

Copy link
Copy Markdown
Contributor

One more merge to try to get codeclimate to see our tests!

Comment thread .travis.yml Outdated
- 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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will check and update

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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.
@prashuchaudhary

Copy link
Copy Markdown
Contributor Author

@mbernier creating a new pull request which is updated with remote master and closing this.
#537

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

difficulty: easy fix is easy in difficulty status: code review request requesting a community code review or review from Twilio

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add unittesting support to .codeclimate.yml

6 participants