Skip to content

Commit 3249fd0

Browse files
authored
Merge pull request #534 from blueyed/pypy
Travis: skip coverage reporting with pypy/pypy3
2 parents 4b508de + 8a27d22 commit 3249fd0

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

.travis.yml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Use container-based environment (faster startup, allows caches).
22
sudo: false
33
language: python
4+
dist: trusty
45

56
matrix:
67
fast_finish: true
@@ -10,15 +11,15 @@ matrix:
1011
- python: 3.6
1112
env: TOXENV=py36-dj20-postgres
1213
- python: 3.6
13-
env: TOXENV=py36-dj111-postgres
14+
env: TOXENV=py36-dj111-sqlite
1415
- python: 3.6
1516
env: TOXENV=py36-checkqa
1617

1718
- python: 3.5
1819
env: TOXENV=py35-dj110-postgres
1920

2021
- python: 3.4
21-
env: TOXENV=py34-dj19-postgres
22+
env: TOXENV=py34-dj19-sqlite_file
2223

2324
- python: 2.7
2425
env: TOXENV=py27-dj111-mysql_innodb
@@ -29,9 +30,9 @@ matrix:
2930
- python: 2.7
3031
env: TOXENV=py27-checkqa
3132

33+
# pypy/pypy3: not included with coverage reports (much slower then).
3234
- python: pypy
3335
env: TOXENV=pypy-dj111-sqlite_file
34-
3536
- python: pypy3
3637
env: TOXENV=pypy3-dj110-sqlite
3738

@@ -56,9 +57,13 @@ install:
5657

5758
- pip install tox==2.9.1
5859
- |
59-
if [[ "${TOXENV%-checkqa}" == "$TOXENV" ]]; then
60+
# Setup coverage tracking, but not with "checkqa" nor "pypy*".
61+
if [[ "${TOXENV%-checkqa}" == "$TOXENV" ]] && [[ "${TOXENV#pypy}" == "$TOXENV" ]]; then
62+
PYTEST_DJANGO_COVERAGE=1
6063
export PYTEST_ADDOPTS='--cov=pytest_django --cov=tests --cov=pytest_django_test --cov-report=term-missing:skip-covered'
6164
export _PYTESTDJANGO_TOX_EXTRA_DEPS=pytest-cov
65+
else
66+
PYTEST_DJANGO_COVERAGE=0
6267
fi
6368
6469
script:
@@ -67,7 +72,7 @@ script:
6772
after_success:
6873
- |
6974
set -ex
70-
if [[ "${TOXENV%-checkqa}" == "$TOXENV" ]]; then
75+
if [[ "$PYTEST_DJANGO_COVERAGE" = 1 ]]; then
7176
pip install codecov
7277
7378
coverage combine

0 commit comments

Comments
 (0)