mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-08-06 21:40:13 +03:00
Merge 3b12e5fa40
into 166801063d
This commit is contained in:
commit
8d056903f8
10
.travis.yml
10
.travis.yml
|
@ -2,7 +2,14 @@ language: python
|
||||||
|
|
||||||
sudo: false
|
sudo: false
|
||||||
|
|
||||||
|
cache:
|
||||||
|
directories:
|
||||||
|
- $HOME/.pip-cache
|
||||||
|
|
||||||
env:
|
env:
|
||||||
|
global:
|
||||||
|
- PIP_CACHE=$HOME/.pip-cache
|
||||||
|
matrix:
|
||||||
- TOX_ENV=py27-flake8
|
- TOX_ENV=py27-flake8
|
||||||
- TOX_ENV=py27-docs
|
- TOX_ENV=py27-docs
|
||||||
- TOX_ENV=py34-django17
|
- TOX_ENV=py34-django17
|
||||||
|
@ -27,7 +34,8 @@ env:
|
||||||
- TOX_ENV=py27-django18beta
|
- TOX_ENV=py27-django18beta
|
||||||
|
|
||||||
install:
|
install:
|
||||||
- pip install tox
|
- pip install --download $PIP_CACHE tox
|
||||||
|
- pip install --no-index --find-links=$PIP_CACHE tox
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- tox -e $TOX_ENV
|
- tox -e $TOX_ENV
|
||||||
|
|
13
custom_pip_install.sh
Executable file
13
custom_pip_install.sh
Executable file
|
@ -0,0 +1,13 @@
|
||||||
|
#!/bin/bash
|
||||||
|
if [[ "$@" == "djangorestframework" ]]; then
|
||||||
|
# Caching djangorestframework package would invalidate Travis cache on every build
|
||||||
|
pip install "$@"
|
||||||
|
else
|
||||||
|
# Try to install from cache, download and install if that fails
|
||||||
|
pip install --no-index --find-links=$PIP_CACHE "$@"
|
||||||
|
EXIT_STATUS=$?
|
||||||
|
if [ $EXIT_STATUS -ne 0 ]; then
|
||||||
|
pip install --download $PIP_CACHE "$@"
|
||||||
|
pip install --no-index --find-links=$PIP_CACHE "$@"
|
||||||
|
fi
|
||||||
|
fi
|
3
tox.ini
3
tox.ini
|
@ -6,6 +6,9 @@ envlist =
|
||||||
{py27,py32,py33,py34}-django{17,18beta}
|
{py27,py32,py33,py34}-django{17,18beta}
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
|
install_command =
|
||||||
|
{toxinidir}/custom_pip_install.sh {packages}
|
||||||
|
|
||||||
commands = ./runtests.py --fast
|
commands = ./runtests.py --fast
|
||||||
setenv =
|
setenv =
|
||||||
PYTHONDONTWRITEBYTECODE=1
|
PYTHONDONTWRITEBYTECODE=1
|
||||||
|
|
Loading…
Reference in New Issue
Block a user