@@ -5,62 +5,55 @@ language: python
5
5
matrix :
6
6
fast_finish : true
7
7
include :
8
-
9
8
- python : 3.6
10
- env : TOXENV=py36-pytest30 -djangomaster-postgres
9
+ env : TOXENV=py36-pytest3 -djangomaster-postgres
11
10
- python : 3.6
12
- env : TOXENV=py36-pytest30 -django1.11-postgres
11
+ env : TOXENV=py36-pytest3 -django1.11-postgres
13
12
- python : 3.6
14
- env : TOXENV=py36-pytest30 -django1.10-postgres
13
+ env : TOXENV=py36-pytest3 -django1.10-postgres
15
14
- python : 3.6
16
- env : TOXENV=py36-pytest30 -django1.9-postgres
15
+ env : TOXENV=py36-pytest3 -django1.9-postgres
17
16
- python : 3.6
18
- env : TOXENV=py36-pytest30 -django1.8-postgres
17
+ env : TOXENV=py36-pytest3 -django1.8-postgres
19
18
- python : 3.6
20
19
env : TOXENV=py36-checkqa
21
20
22
21
- python : 3.5
23
- env : TOXENV=py35-pytest30 -django1.11-postgres
22
+ env : TOXENV=py35-pytest3 -django1.11-postgres
24
23
25
24
- python : 3.4
26
- env : TOXENV=py34-pytest30 -django1.11-postgres
25
+ env : TOXENV=py34-pytest3 -django1.11-postgres
27
26
28
27
- python : 3.3
29
- env : TOXENV=py34-pytest30 -django1.8-postgres
28
+ env : TOXENV=py34-pytest3 -django1.8-postgres
30
29
31
30
- python : 2.7
32
- env : TOXENV=py27-pytest30 -django1.11-mysql_innodb
31
+ env : TOXENV=py27-pytest3 -django1.11-mysql_innodb
33
32
- python : 2.7
34
- env : TOXENV=py27-pytest30 -django1.11-mysql_myisam
33
+ env : TOXENV=py27-pytest3 -django1.11-mysql_myisam
35
34
- python : 2.7
36
- env : TOXENV=py27-pytest30 -django1.11-postgres
35
+ env : TOXENV=py27-pytest3 -django1.11-postgres
37
36
- python : 2.7
38
- env : TOXENV=py27-pytest30 -django1.10-postgres
37
+ env : TOXENV=py27-pytest3 -django1.10-postgres
39
38
- python : 2.7
40
- env : TOXENV=py27-pytest30 -django1.9-postgres
39
+ env : TOXENV=py27-pytest3 -django1.9-postgres
41
40
- python : 2.7
42
- env : TOXENV=py27-pytest30 -django1.8-postgres
41
+ env : TOXENV=py27-pytest3 -django1.8-postgres
43
42
- python : 2.7
44
- env : TOXENV=py27-pytest30 -django1.7-postgres
43
+ env : TOXENV=py27-pytest3 -django1.7-postgres
45
44
- python : 2.7
46
45
env : TOXENV=py27-checkqa
47
46
48
47
- python : pypy
49
- env : TOXENV=pypy-pytest30 -django1.11-sqlite_file
48
+ env : TOXENV=pypy-pytest3 -django1.11-sqlite_file
50
49
51
50
- python : pypy3
52
- env : TOXENV=pypy3-pytest30 -django1.8-sqlite
51
+ env : TOXENV=pypy3-pytest3 -django1.8-sqlite
53
52
- python : pypy3
54
- env : TOXENV=pypy3-pytest30 -django1.10-sqlite_file
53
+ env : TOXENV=pypy3-pytest3 -django1.10-sqlite_file
55
54
56
55
allow_failures :
57
- - env : TOXENV=py36-pytest30-djangomaster-postgres
58
-
59
- # Temporary.
60
- # https://github.com/pytest-dev/pytest-django/pull/445
61
- # https://github.com/pytest-dev/pytest-django/issues/448
62
- - env : TOXENV=pypy3-pytest30-django1.8-sqlite
63
- - env : TOXENV=pypy3-pytest30-django1.10-sqlite_file
56
+ - env : TOXENV=py36-pytest3-djangomaster-postgres
64
57
65
58
cache :
66
59
directories :
@@ -76,12 +69,31 @@ install:
76
69
- printf '\necho "Using pip-wrapper.." >&2\ntravis_retry pip "$@"' >> bin/travis_retry_pip
77
70
- chmod +x bin/travis_retry_pip
78
71
- sed -i.bak 's/^\[testenv\]/\0\ninstall_command = travis_retry_pip install {opts} {packages}/' tox.ini
79
- - diff tox.ini tox.ini.bak && return 1 || true
80
- - sed -i.bak 's/whitelist_externals =/\0\n travis_retry_pip/' tox.ini
81
- - diff tox.ini tox.ini.bak && return 1 || true
72
+ - if diff tox.ini tox.ini.bak; then exit 1; fi
73
+ - printf '\nwhitelist_externals = travis_retry_pip' >> tox.ini
82
74
83
- - pip install tox==2.3.1
75
+ - pip install tox==2.7.0
76
+ - |
77
+ if [[ "${TOXENV%-checkqa}" == "$TOXENV" ]]; then
78
+ export PYTEST_ADDOPTS='--cov=pytest_django --cov=tests --cov=pytest_django_test --cov-report=term-missing:skip-covered'
79
+ export _PYTESTDJANGO_TOX_EXTRA_DEPS=pytest-cov
80
+ fi
84
81
85
82
script :
86
83
- tox
87
84
- " find ${TRAVIS_BUILD_DIR}/.tox -name 'log' -o -name '__pycache__' -type d | xargs -I {} rm -rf {}"
85
+
86
+ after_success :
87
+ - |
88
+ set -ex
89
+ if [[ "${TOXENV%-checkqa}" == "$TOXENV" ]]; then
90
+ pip install codecov
91
+ coverage combine
92
+ coverage xml
93
+ coverage report -m --skip-covered
94
+
95
+ codecov_flags=${TOXENV//./}
96
+ codecov_flags=${codecov_flags//-/ }
97
+ codecov --required -X search gcov pycov -f coverage.xml --flags $codecov_flags
98
+ fi
99
+ set +x
0 commit comments