Skip to content

Commit a3bb980

Browse files
committed
Merge pull request #220 from gsnedders/codecov
Add code coverage reports; r=nobody!
2 parents 91876a7 + 66a3f42 commit a3bb980

File tree

4 files changed

+22
-20
lines changed

4 files changed

+22
-20
lines changed

.coveragerc

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[run]
2+
branch = True
3+
source = html5lib
4+
5+
[paths]
6+
source =
7+
html5lib
8+
.tox/*/lib/python*/site-packages/html5lib

.travis.yml

+5-13
Original file line numberDiff line numberDiff line change
@@ -17,27 +17,19 @@ env:
1717
- USE_OPTIONAL=true
1818
- USE_OPTIONAL=false
1919

20-
matrix:
21-
exclude:
22-
- python: "2.7"
23-
env: USE_OPTIONAL=false
24-
- python: "3.4"
25-
env: USE_OPTIONAL=false
26-
include:
27-
- python: "2.7"
28-
env: USE_OPTIONAL=false FLAKE=true
29-
- python: "3.4"
30-
env: USE_OPTIONAL=false FLAKE=true
31-
3220
before_install:
3321
- git submodule update --init --recursive
3422

3523
install:
3624
- bash requirements-install.sh
3725

3826
script:
39-
- py.test
27+
- if [[ $TRAVIS_PYTHON_VERSION == pypy* ]]; then py.test; fi
28+
- if [[ $TRAVIS_PYTHON_VERSION != pypy* ]]; then coverage run -m pytest; fi
4029
- bash flake8-run.sh
4130

4231
after_script:
4332
- python debug-info.py
33+
34+
after_success:
35+
- if [[ $TRAVIS_PYTHON_VERSION != pypy* ]]; then coverage combine && codecov; fi

flake8-run.sh

+5-7
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,8 @@ if [[ ! -x $(which flake8) ]]; then
55
exit 1
66
fi
77

8-
if [[ $TRAVIS != "true" || $FLAKE == "true" ]]; then
9-
find html5lib/ -name '*.py' -and -not -name 'constants.py' -print0 | xargs -0 flake8 --ignore=E501
10-
flake1=$?
11-
flake8 --max-line-length=99 --ignore=E126 html5lib/constants.py
12-
flake2=$?
13-
exit $[$flake1 || $flake2]
14-
fi
8+
find html5lib/ -name '*.py' -and -not -name 'constants.py' -print0 | xargs -0 flake8 --ignore=E501
9+
flake1=$?
10+
flake8 --max-line-length=99 --ignore=E126 html5lib/constants.py
11+
flake2=$?
12+
exit $[$flake1 || $flake2]

requirements-install.sh

+4
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,7 @@ pip install -U -r requirements-test.txt
1313
if [[ $USE_OPTIONAL == "true" ]]; then
1414
pip install -U -r requirements-optional.txt
1515
fi
16+
17+
if [[ $CI == "true" ]]; then
18+
pip install -U codecov
19+
fi

0 commit comments

Comments
 (0)