Speed up build process (#2312)

* We don't need all dependecies to run 'tox -e lint'
* We don't really use pytest-django but it wouldn't hurt
  setting --reuse-db
* coveralls doesn't seem to be working at the moment so
  I removed it
* Delete unused runtests.sh. 'tox -e py27' already does
  the same job.
* Cache all dependencies in Travis CI
dont-set-build-state-on-exit
Berker Peksag 2016-07-18 21:31:37 +03:00 committed by Anthony
parent 6b345e5ad4
commit 556a672781
5 changed files with 13 additions and 29 deletions

View File

@ -6,13 +6,13 @@ env:
- TOX_ENV=py27
- TOX_ENV=docs
- TOX_ENV=lint
cache:
directories:
- ~/.cache/pip
install:
- pip install tox
- pip install coveralls
script:
- tox -e $TOX_ENV
after_success:
- coveralls
notifications:
slack:
rooms:

2
pytest.ini Normal file
View File

@ -0,0 +1,2 @@
[pytest]
addopts = --reuse-db

7
requirements/lint.txt Normal file
View File

@ -0,0 +1,7 @@
-r pip.txt
maxcdn
astroid<1.4
pylint<1.5
prospector
pylint-django<0.7
pyflakes<1.2.0

View File

@ -1,18 +0,0 @@
#!/bin/sh
(
python_path=`pwd`
if [ -n "${PYTHON_PATH}" ]; then
python_path="${python_path}:${PYTHONPATH}"
fi
export PYTHONPATH=$python_path
if [ -z "${DJANGO_SETTINGS_MODULE}" ]; then
export DJANGO_SETTINGS_MODULE=settings.test
fi
cd readthedocs
rm -rf rtd_tests/builds/
LANG=C \
coverage run -m pytest $*
)

View File

@ -19,14 +19,7 @@ commands =
sphinx-build -b html -d {envtmpdir}/doctrees . {envtmpdir}/html
[testenv:lint]
deps =
{[testenv]deps}
maxcdn
astroid<1.4
pylint<1.5
prospector
pylint-django<0.7
pyflakes<1.2.0
deps = -r{toxinidir}/requirements/lint.txt
commands =
prospector \
--profile-path={toxinidir} \