sudo: requires
services:
  - docker

language: python
python:
  - "2.7"

install:
  - pip install pep8

script:
  - pep8 --ignore=E402,E501 .
  - docker build -t openface .
  - docker run openface /bin/sh -c "cd /root/src/openface; nosetests2 -v -d test.py"

sudo: requires
services: [docker]
language: python
python: ["2.7"]

before_install:
  - docker build -t openface .
  - docker run openface /bin/sh -c "cd /root/src/openface; nosetests2 -v -d test.py"

install:
  - pip install pep8

script:
  - pep8 --ignore=E402,E501 .

Move docker tests to before_install.
Travis: Move docker tests to before_install.
