Skip to content

Commit 29c9763

Browse files
committed
Use Orchard to run integration tests
1 parent ca7151a commit 29c9763

5 files changed

Lines changed: 26 additions & 47 deletions

File tree

.travis.yml

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,22 @@ python:
33
- '2.6'
44
- '2.7'
55
env:
6-
- DOCKER_VERSION=0.9.1
7-
- DOCKER_VERSION=0.10.0
8-
install: script/travis-install
6+
global:
7+
- secure: exbot0LTV/0Wic6ElKCrOZmh2ZrieuGwEqfYKf5rVuwu1sLngYRihh+lBL/hTwc79NSu829pbwiWfsQZrXbk/yvaS7avGR0CLDoipyPxlYa2/rfs/o4OdTZqXv0LcFmmd54j5QBMpWU1S+CYOwNkwas57trrvIpPbzWjMtfYzOU=
8+
install:
9+
- pip install .
10+
- pip install -r requirements.txt
11+
- pip install -r requirements-dev.txt
12+
- sudo curl -L -o /usr/local/bin/orchard https://github.com/orchardup/go-orchard/releases/download/2.0.5/linux
13+
- sudo chmod +x /usr/local/bin/orchard
14+
before_script:
15+
- '[ "${TRAVIS_PULL_REQUEST}" = "false" ] && orchard hosts rm -f $TRAVIS_JOB_ID'
16+
- '[ "${TRAVIS_PULL_REQUEST}" = "false" ] && orchard hosts create $TRAVIS_JOB_ID || false'
917
script:
10-
- pwd
11-
- env
12-
- sekexe/run "`pwd`/script/travis $TRAVIS_PYTHON_VERSION"
18+
- nosetests tests/unit
19+
- '[ "${TRAVIS_PULL_REQUEST}" = "false" ] && script/travis-integration || false'
20+
after_script:
21+
- '[ "${TRAVIS_PULL_REQUEST}" = "false" ] && orchard hosts rm -f $TRAVIS_JOB_ID || false'
1322
deploy:
1423
provider: pypi
1524
user: orchard

requirements-dev.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
mock==1.0.1
22
nose==1.3.0
33
pyinstaller==2.1
4+
unittest2

script/travis

Lines changed: 0 additions & 23 deletions
This file was deleted.

script/travis-install

Lines changed: 0 additions & 18 deletions
This file was deleted.

script/travis-integration

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/bash
2+
set -ex
3+
4+
# Kill background processes on exit
5+
trap 'kill -9 $(jobs -p)' SIGINT SIGTERM EXIT
6+
7+
export DOCKER_HOST=tcp://localhost:4243
8+
orchard proxy -H $TRAVIS_JOB_ID $DOCKER_HOST &
9+
sleep 2
10+
nosetests -v

0 commit comments

Comments
 (0)