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 11[run]
22parallel = true
3- source = pytest_django
3+ source = pytest_django,pytest_django_test,tests
44branch = true
Original file line number Diff line number Diff line change @@ -5,7 +5,6 @@ language: python
55matrix :
66 fast_finish : true
77 include :
8-
98 - python : 3.6
109 env : TOXENV=py36-pytest3-djangomaster-postgres
1110 - python : 3.6
@@ -75,7 +74,27 @@ install:
7574 - diff tox.ini tox.ini.bak && return 1 || true
7675
7776 - 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
7882
7983script :
8084 - tox
8185 - " 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 =
1414deps =
1515 django-configurations ==2.0
1616 pytest-xdist ==1.15
17+ {env:_PYTESTDJANGO_TOX_EXTRA_DEPS:}
1718
1819 checkqa: flake8
1920
3536setenv =
3637 PYTHONPATH = {toxinidir}:{env:PYTHONPATH:}
3738
39+ passenv = PYTEST_ADDOPTS
40+
3841usedevelop = True
3942
4043commands =
You can’t perform that action at this time.
0 commit comments