File tree Expand file tree Collapse file tree 3 files changed +24
-2
lines changed Expand file tree Collapse file tree 3 files changed +24
-2
lines changed Original file line number Diff line number Diff line change 1
1
[run]
2
2
parallel = true
3
- source = pytest_django
3
+ source = pytest_django,pytest_django_test,tests
4
4
branch = true
Original file line number Diff line number Diff line change @@ -5,7 +5,6 @@ language: python
5
5
matrix :
6
6
fast_finish : true
7
7
include :
8
-
9
8
- python : 3.6
10
9
env : TOXENV=py36-pytest3-djangomaster-postgres
11
10
- python : 3.6
@@ -75,7 +74,27 @@ install:
75
74
- diff tox.ini tox.ini.bak && return 1 || true
76
75
77
76
- pip install tox==2.7.0
77
+ - |
78
+ if [[ "${TOXENV%-checkqa}" == "$TOXENV" ]]; then
79
+ export PYTEST_ADDOPTS='--cov=pytest_django --cov=tests --cov=pytest_django_test --cov-report=term-missing:skip-covered'
80
+ export _PYTESTDJANGO_TOX_EXTRA_DEPS=pytest-cov
81
+ fi
78
82
79
83
script :
80
84
- tox
81
85
- " find ${TRAVIS_BUILD_DIR}/.tox -name 'log' -o -name '__pycache__' -type d | xargs -I {} rm -rf {}"
86
+
87
+ after_success :
88
+ - |
89
+ set -ex
90
+ if [[ "${TOXENV%-checkqa}" == "$TOXENV" ]]; then
91
+ pip install codecov
92
+ coverage combine
93
+ coverage xml
94
+ coverage report -m --skip-covered
95
+
96
+ codecov_flags=${TOXENV//./}
97
+ codecov_flags=${codecov_flags//-/ }
98
+ codecov --required -X search gcov pycov -f coverage.xml --flags $codecov_flags
99
+ fi
100
+ set +x
Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ envlist =
14
14
deps =
15
15
django-configurations ==2.0
16
16
pytest-xdist ==1.15
17
+ {env:_PYTESTDJANGO_TOX_EXTRA_DEPS:}
17
18
18
19
checkqa: flake8
19
20
35
36
setenv =
36
37
PYTHONPATH = {toxinidir}:{env:PYTHONPATH:}
37
38
39
+ passenv = PYTEST_ADDOPTS
40
+
38
41
usedevelop = True
39
42
40
43
commands =
You can’t perform that action at this time.
0 commit comments