Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Work around codecov.io connection failures #396

Closed
wants to merge 11 commits into from
16 changes: 16 additions & 0 deletions tests/coverage/upload_codecov.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/env/python

from subprocess import call
import time

if __name__ == '__main__':
max_tries = 10
num_tries = 1
cmd = 'codecov --required'
rc = call(cmd)
while rc != 0 and num_tries < max_tries:
time.sleep(5)
rc = call(cmd)
num_tries += 1

raise SystemExit(rc)
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ basepython = python3.8
commands =
python -m coverage run test.py -u
coverage report -m
codecov
- python tests/coverage/upload_codecov.py # do not report error if codecov upload fails

# Envs that will test installation from a wheel
[testenv:wheelinstall-py35]
Expand Down