1
1
# Use container-based environment (faster startup, allows caches).
2
2
sudo : false
3
3
language : python
4
+ dist : trusty
4
5
5
6
matrix :
6
7
fast_finish : true
@@ -10,15 +11,15 @@ matrix:
10
11
- python : 3.6
11
12
env : TOXENV=py36-dj20-postgres
12
13
- python : 3.6
13
- env : TOXENV=py36-dj111-postgres
14
+ env : TOXENV=py36-dj111-sqlite
14
15
- python : 3.6
15
16
env : TOXENV=py36-checkqa
16
17
17
18
- python : 3.5
18
19
env : TOXENV=py35-dj110-postgres
19
20
20
21
- python : 3.4
21
- env : TOXENV=py34-dj19-postgres
22
+ env : TOXENV=py34-dj19-sqlite_file
22
23
23
24
- python : 2.7
24
25
env : TOXENV=py27-dj111-mysql_innodb
@@ -29,9 +30,9 @@ matrix:
29
30
- python : 2.7
30
31
env : TOXENV=py27-checkqa
31
32
33
+ # pypy/pypy3: not included with coverage reports (much slower then).
32
34
- python : pypy
33
35
env : TOXENV=pypy-dj111-sqlite_file
34
-
35
36
- python : pypy3
36
37
env : TOXENV=pypy3-dj110-sqlite
37
38
@@ -56,9 +57,13 @@ install:
56
57
57
58
- pip install tox==2.9.1
58
59
- |
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
60
63
export PYTEST_ADDOPTS='--cov=pytest_django --cov=tests --cov=pytest_django_test --cov-report=term-missing:skip-covered'
61
64
export _PYTESTDJANGO_TOX_EXTRA_DEPS=pytest-cov
65
+ else
66
+ PYTEST_DJANGO_COVERAGE=0
62
67
fi
63
68
64
69
script :
@@ -67,7 +72,7 @@ script:
67
72
after_success :
68
73
- |
69
74
set -ex
70
- if [[ "${TOXENV%-checkqa} " == "$TOXENV" ]]; then
75
+ if [[ "$PYTEST_DJANGO_COVERAGE " = 1 ]]; then
71
76
pip install codecov
72
77
73
78
coverage combine
0 commit comments