Skip to content

Commit c59df4d

Browse files
committed
Add report-coverage.sh script too
1 parent e487bc2 commit c59df4d

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ script: env COLUMNS=120 python -m tox
6262
after_success:
6363
- |
6464
if [[ "$PYTEST_COVERAGE" = 1 ]]; then
65-
env CODECOV_NAME="$TOXENV-$TRAVIS_OS_NAME" scripts/report-coverage.sh
65+
CODECOV_NAME="$TOXENV-$TRAVIS_OS_NAME" scripts/report-coverage.sh
6666
fi
6767
branches:
6868
only:

scripts/report-coverage.sh

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/usr/bin/env bash
2+
3+
set -e
4+
set -x
5+
6+
if [ -z "$TOXENV" ]; then
7+
python -m pip install coverage
8+
else
9+
# Add last TOXENV to $PATH.
10+
PATH="$PWD/.tox/${TOXENV##*,}/bin:$PATH"
11+
fi
12+
13+
python -m coverage combine
14+
python -m coverage xml
15+
python -m coverage report -m
16+
# Set --connect-timeout to work around https://github.com/curl/curl/issues/4461
17+
curl -S -L --connect-timeout 5 --retry 6 -s https://codecov.io/bash -o codecov-upload.sh
18+
bash codecov-upload.sh -Z -X fix -f coverage.xml

0 commit comments

Comments
 (0)