8000 travis: Use codecov (#387) · ossdev07/msgpack-python@235c603 · GitHub
[go: up one dir, main page]

Skip to content

Commit 235c603

Browse files
authored
travis: Use codecov (msgpack#387)
1 parent 7e9905b commit 235c603

File tree

1 file changed

+27
-21
lines changed

1 file changed

+27
-21
lines changed

.travis.yml

Lines changed: 27 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,20 @@ python:
1212
- "3.7"
1313
- "3.8-dev"
1414

15+
16+
_pure: &pure
17+
install:
18+
- pip install -U pip
19+
- pip install -U pytest pytest-cov codecov
20+
- pip install .
21+
script:
22+
- pytest --cov=msgpack -v test
23+
1524
matrix:
1625
include:
1726
- name: Black
1827
language: python
19-
python: 3.8
28+
python: 3.7
2029
install:
2130
- pip install black
2231
script:
@@ -35,38 +44,35 @@ matrix:
3544
- docker pull $DOCKER_IMAGE
3645
script:
3746
- docker run --rm -v `pwd`:/io -w /io $DOCKER_IMAGE /io/docker/runtests.sh
47+
48+
- name: "Python 2 (fallback)"
49+
python: "2.7"
50+
<<: *pure
51+
3852
- name: "pypy2.7"
3953
python: "pypy2.7-7.1.1"
40-
install:
41-
- pip install -e .
42-
script:
43-
- py.test -v test
54+
<<: *pure
55+
4456
- name: "pypy3"
4557
python: "pypy3.6-7.1.1"
46-
install:
47-
- pip install -e .
48-
script:
49-
- pytest -v test
50-
- name: "Python 2 (fallback)"
51-
python: "2.7"
52-
install:
53-
- pip install -U pip
54-
- pip install -U pytest
55-
- pip install .
56-
script:
57-
- pytest -v test
58+
<<: *pure
5859

5960
install:
6061
- pip install -U pip
61-
- pip install -U pytest
62-
- pip install -r requirements.txt
62+
- pip install -U pytest pytest-cov codecov
63+
- pip install -r requirements.txt # Cython
6364
- make cython
6465
- pip install -e .
6566

6667
script:
6768
- python -c 'import sys; print(hex(sys.maxsize))'
6869
- python -c 'from msgpack import _cmsgpack'
69-
- pytest -v test
70-
- MSGPACK_PUREPYTHON=x pytest -v test
70+
- pytest --cov=msgpack -v test
71+
- MSGPACK_PUREPYTHON=x pytest --cov=msgpack -v test
72+
73+
after_success:
74+
- if [ -f .coverage ]; then
75+
codecov;
76+
fi
7177

7278
# vim: sw=2 ts=2

0 commit comments

Comments
 (0)
0