Move coveralls handling from tox to travis to work around Jython urllib issues.
This commit is contained in:
@@ -30,6 +30,10 @@ before_install:
|
|||||||
- export PATH="$HOME/bin:$PATH"
|
- export PATH="$HOME/bin:$PATH"
|
||||||
|
|
||||||
install:
|
install:
|
||||||
|
- pip install coveralls
|
||||||
- pip install tox-travis
|
- pip install tox-travis
|
||||||
|
|
||||||
script: tox
|
script: tox
|
||||||
|
|
||||||
|
after_success:
|
||||||
|
- coveralls
|
||||||
|
|||||||
@@ -1,28 +0,0 @@
|
|||||||
#!/bin/env/python
|
|
||||||
|
|
||||||
"""Runs coveralls if in Travis CI build environment. Taken from
|
|
||||||
http://stackoverflow.com/a/33012308/1960601
|
|
||||||
"""
|
|
||||||
|
|
||||||
import json
|
|
||||||
import os
|
|
||||||
import pickle
|
|
||||||
import sys
|
|
||||||
|
|
||||||
from subprocess import call
|
|
||||||
|
|
||||||
def convert_old_coverage_to_new(filename):
|
|
||||||
with open(filename, "rb") as inp_file:
|
|
||||||
coverage_results = pickle.load(inp_file)
|
|
||||||
main_results ={"lines": coverage_results['lines']}
|
|
||||||
with open(".coverage","w") as out_file:
|
|
||||||
out_file.write("!coverage.py: This is a private format,"
|
|
||||||
"don't read it directly!")
|
|
||||||
out_file.write(json.dumps(main_results))
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
|
||||||
if sys.platform.lower().startswith('java'):
|
|
||||||
convert_old_coverage_to_new(".coverage")
|
|
||||||
if 'TRAVIS' in os.environ:
|
|
||||||
rc = call('coveralls')
|
|
||||||
raise SystemExit(rc)
|
|
||||||
@@ -23,10 +23,9 @@ deps =
|
|||||||
py26: unittest2==0.5.1
|
py26: unittest2==0.5.1
|
||||||
# urllib3 required by coveralls. See https://github.com/eddyxu/cpp-coveralls/issues/108
|
# urllib3 required by coveralls. See https://github.com/eddyxu/cpp-coveralls/issues/108
|
||||||
py26: urllib3[secure]
|
py26: urllib3[secure]
|
||||||
jython: coverage==3.7.1
|
|
||||||
py: JPype1==0.6.2
|
py: JPype1==0.6.2
|
||||||
jip==0.9.10
|
jip==0.9.10
|
||||||
coveralls
|
coverage
|
||||||
commands =
|
commands =
|
||||||
python --version
|
python --version
|
||||||
python ci/jipconf_subst.py {envdir} {toxworkdir}/shared
|
python ci/jipconf_subst.py {envdir} {toxworkdir}/shared
|
||||||
@@ -36,4 +35,3 @@ commands =
|
|||||||
driver-mock: jip install org.jaydebeapi:mockdriver:1.0-SNAPSHOT
|
driver-mock: jip install org.jaydebeapi:mockdriver:1.0-SNAPSHOT
|
||||||
coverage run -a --source jaydebeapi test/testsuite.py {env:TESTNAME}
|
coverage run -a --source jaydebeapi test/testsuite.py {env:TESTNAME}
|
||||||
driver-hsqldb: coverage run -a --source jaydebeapi test/doctests.py
|
driver-hsqldb: coverage run -a --source jaydebeapi test/doctests.py
|
||||||
python ci/run_coveralls.py
|
|
||||||
|
|||||||
Reference in New Issue
Block a user