Bug 1219889 - Travis: Use pip rather than peep for the python-tests job

The python-tests job is run on non-container infra so can't use caching.
Peep install takes 60s compared to 30s for pip (part hashing cost, part
peep's unavoidable design inefficiencies due to not being built into
pip), which is painful given that we do a fully install every time due
to lack of caching.

The linters step (which can use caching) is already testing the peep
install works, so we can fall back to plain pip for this job part to
save an extra 30s from the runtime.

This also adds the `language: python` key which was the missing
ingredient to getting a virtualenv set up for us. Now that we're not
using peep, it doesn't matter that the provided virtualenv is using
pip v7.x (which is incompatible with peep).
This commit is contained in:
Ed Morley 2015-10-29 20:26:03 +00:00
Родитель 99fd1617ec
Коммит 2bde0993db
1 изменённых файлов: 4 добавлений и 6 удалений

Просмотреть файл

@ -52,6 +52,7 @@ matrix:
# to it, by setting `sudo: false`, so we can use caching for this job.
sudo: required
dist: trusty
language: python
python: "2.7"
services:
- rabbitmq
@ -61,12 +62,9 @@ matrix:
- sudo apt-get update -qq
- sudo apt-get install -qq mysql-server-5.6 mysql-client-5.6 mysql-client-core-5.6
install:
# We use `--user` with pip install since the non-container infra doesn't set up
# a virtualenv, and we cannot use sudo due to:
# https://github.com/travis-ci/travis-ci/issues/4989
# Disabling the pip version check speeds up the install considerably, since peep
# calls pip once per package, which results in duplicate checks (plus log spam).
- ./bin/peep.py install --user -r requirements/common.txt -r requirements/dev.txt --disable-pip-version-check
# This uses pip rather than peep, since it takes half the time, and unlike the other
# jobs, this one cannot use caching. The hashes are validated in the linters job.
- pip install --disable-pip-version-check -r requirements/common.txt -r requirements/dev.txt
script:
- py.test tests/$* --runslow