MediaMath / t1-python

Python SDK for MediaMath Platform APIs
https://developer.mediamath.com/
Apache License 2.0
18 stars 30 forks source link

Fix code climate reporting in travis #140

Closed ghost closed 7 years ago

ghost commented 7 years ago

I stumbled upon your project when looking for examples of how to integrate code climate, and tried copying your configuration. Unfortunately it's only 99% correct and the data is not being submitted. Updated the travis config to make it work.

Current output:

Submitting payload to https://codeclimate.com... 401 Client Error: Unauthorized for url: https://codeclimate.com/test_reports

Contact support at https://codeclimate.com/help with the following debug info if error persists:
401 Client Error: Unauthorized for url: https://codeclimate.com/test_reports
codeclimate-test-repoter 0.2.0
Requests 2.13.0
Python 2.7.9 (default, Feb  5 2015, 15:48:42) 
[GCC 4.6.3]
/home/travis/virtualenv/python2.7.9/bin/python
Linux 4.8.12-040812-generic
travis_time:end:0217ec16:start=1487868265738651512,finish=1487868266984367060,duration=1245715548

Expected output:

Submitting payload to https://codeclimate.com... done!
ghost commented 7 years ago

Looks like it's currenty failing with the following:

usage: codeclimate-test-reporter [-h] [--file FILE] [--token TOKEN] [--stdout]
                                 [--debug] [--version]
codeclimate-test-reporter: error: argument --token: expected one argument

I don't know what your value of the token is so can't debug further.

fsargent commented 7 years ago

This is annoying. It's not the token's fault - it's codeclimate-test-reporter, or travis not dealing with the environment variables we've setup properly. Thank you for testing this!

ghost commented 7 years ago

What I initially committed is what worked for me. See this build for details.

FodT commented 7 years ago

Thanks for flagging this, @impala2 - I've rolled your change into our travis branch and will merge that one :)