2019-06-05 09:47:36 +08:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
set -e
|
|
|
|
set -x
|
|
|
|
|
|
|
|
if [ -z "$TOXENV" ]; then
|
|
|
|
python -m pip install coverage
|
|
|
|
else
|
|
|
|
# Add last TOXENV to $PATH.
|
|
|
|
PATH="$PWD/.tox/${TOXENV##*,}/bin:$PATH"
|
|
|
|
fi
|
|
|
|
|
|
|
|
python -m coverage combine
|
|
|
|
python -m coverage xml
|
|
|
|
python -m coverage report -m
|
2019-10-13 02:50:33 +08:00
|
|
|
# Set --connect-timeout to work around https://github.com/curl/curl/issues/4461
|
2020-01-31 02:55:40 +08:00
|
|
|
curl -S -L --connect-timeout 5 --retry 6 -s https://codecov.io/bash -o codecov-upload.sh
|
2020-01-23 21:44:30 +08:00
|
|
|
bash codecov-upload.sh -Z -X fix -f coverage.xml "$@"
|