mirror of https://github.com/docker/compose.git
Use Orchard to run integration tests
This commit is contained in:
parent
ca7151aeb1
commit
29c9763feb
21
.travis.yml
21
.travis.yml
|
@ -3,13 +3,22 @@ python:
|
||||||
- '2.6'
|
- '2.6'
|
||||||
- '2.7'
|
- '2.7'
|
||||||
env:
|
env:
|
||||||
- DOCKER_VERSION=0.9.1
|
global:
|
||||||
- DOCKER_VERSION=0.10.0
|
- secure: exbot0LTV/0Wic6ElKCrOZmh2ZrieuGwEqfYKf5rVuwu1sLngYRihh+lBL/hTwc79NSu829pbwiWfsQZrXbk/yvaS7avGR0CLDoipyPxlYa2/rfs/o4OdTZqXv0LcFmmd54j5QBMpWU1S+CYOwNkwas57trrvIpPbzWjMtfYzOU=
|
||||||
install: script/travis-install
|
install:
|
||||||
|
- pip install .
|
||||||
|
- pip install -r requirements.txt
|
||||||
|
- pip install -r requirements-dev.txt
|
||||||
|
- sudo curl -L -o /usr/local/bin/orchard https://github.com/orchardup/go-orchard/releases/download/2.0.5/linux
|
||||||
|
- sudo chmod +x /usr/local/bin/orchard
|
||||||
|
before_script:
|
||||||
|
- '[ "${TRAVIS_PULL_REQUEST}" = "false" ] && orchard hosts rm -f $TRAVIS_JOB_ID'
|
||||||
|
- '[ "${TRAVIS_PULL_REQUEST}" = "false" ] && orchard hosts create $TRAVIS_JOB_ID || false'
|
||||||
script:
|
script:
|
||||||
- pwd
|
- nosetests tests/unit
|
||||||
- env
|
- '[ "${TRAVIS_PULL_REQUEST}" = "false" ] && script/travis-integration || false'
|
||||||
- sekexe/run "`pwd`/script/travis $TRAVIS_PYTHON_VERSION"
|
after_script:
|
||||||
|
- '[ "${TRAVIS_PULL_REQUEST}" = "false" ] && orchard hosts rm -f $TRAVIS_JOB_ID || false'
|
||||||
deploy:
|
deploy:
|
||||||
provider: pypi
|
provider: pypi
|
||||||
user: orchard
|
user: orchard
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
mock==1.0.1
|
mock==1.0.1
|
||||||
nose==1.3.0
|
nose==1.3.0
|
||||||
pyinstaller==2.1
|
pyinstaller==2.1
|
||||||
|
unittest2
|
||||||
|
|
|
@ -1,23 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Exit on first error
|
|
||||||
set -ex
|
|
||||||
|
|
||||||
# Put Python eggs in a writeable directory
|
|
||||||
export PYTHON_EGG_CACHE="/tmp/.python-eggs"
|
|
||||||
|
|
||||||
# Activate correct virtualenv
|
|
||||||
TRAVIS_PYTHON_VERSION=$1
|
|
||||||
source /home/travis/virtualenv/python${TRAVIS_PYTHON_VERSION}/bin/activate
|
|
||||||
|
|
||||||
env
|
|
||||||
|
|
||||||
# Kill background processes on exit
|
|
||||||
trap 'kill -9 $(jobs -p)' SIGINT SIGTERM EXIT
|
|
||||||
|
|
||||||
# Start docker daemon
|
|
||||||
docker -d -H unix:///var/run/docker.sock 2>> /dev/null >> /dev/null &
|
|
||||||
sleep 2
|
|
||||||
|
|
||||||
# $init is set by sekexe
|
|
||||||
cd $(dirname $init)/.. && nosetests -v
|
|
|
@ -1,18 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
set -ex
|
|
||||||
|
|
||||||
sudo sh -c "wget -qO- https://get.docker.io/gpg | apt-key add -"
|
|
||||||
sudo sh -c "echo deb http://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list"
|
|
||||||
sudo apt-get update
|
|
||||||
echo exit 101 | sudo tee /usr/sbin/policy-rc.d
|
|
||||||
sudo chmod +x /usr/sbin/policy-rc.d
|
|
||||||
sudo apt-get install -qy slirp lxc lxc-docker-$DOCKER_VERSION
|
|
||||||
git clone git://github.com/jpetazzo/sekexe
|
|
||||||
python setup.py install
|
|
||||||
pip install -r requirements-dev.txt
|
|
||||||
|
|
||||||
if [[ $TRAVIS_PYTHON_VERSION == "2.6" ]]; then
|
|
||||||
pip install unittest2
|
|
||||||
fi
|
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
#!/bin/bash
|
||||||
|
set -ex
|
||||||
|
|
||||||
|
# Kill background processes on exit
|
||||||
|
trap 'kill -9 $(jobs -p)' SIGINT SIGTERM EXIT
|
||||||
|
|
||||||
|
export DOCKER_HOST=tcp://localhost:4243
|
||||||
|
orchard proxy -H $TRAVIS_JOB_ID $DOCKER_HOST &
|
||||||
|
sleep 2
|
||||||
|
nosetests -v
|
Loading…
Reference in New Issue