Use pip for httpbin in Mac Travis CI builds
Docker isn't available under Mac, unfortunately. Notice that it's still better to use Docker if it is available, rather than using pip everywhere, as pip has trouble installing httpbin in the Ubuntu 14.04 build, for example.
This commit is contained in:
parent
9307fa6f89
commit
32cdda65bb
@ -14,10 +14,21 @@ export NO_AT_BRIDGE=1
|
||||
|
||||
launch_httpbin() {
|
||||
echo 'travis_fold:start:httpbin'
|
||||
echo 'Running httpbin container...'
|
||||
docker pull kennethreitz/httpbin
|
||||
docker run -d -p 80:80 kennethreitz/httpbin
|
||||
WX_TEST_WEBREQUEST_URL="http://localhost"
|
||||
echo 'Running httpbin...'
|
||||
|
||||
# Prefer to use docker if it's available as it's more robust than dealing
|
||||
# with pip -- but we need to have a fallback as at least Mac builds don't
|
||||
# have docker.
|
||||
if command -v docker; then
|
||||
docker pull kennethreitz/httpbin
|
||||
docker run -d -p 80:80 kennethreitz/httpbin
|
||||
WX_TEST_WEBREQUEST_URL="http://localhost"
|
||||
else
|
||||
pip install httpbin
|
||||
python -m httpbin.core &
|
||||
WX_TEST_WEBREQUEST_URL="http://localhost:5000"
|
||||
fi
|
||||
|
||||
export WX_TEST_WEBREQUEST_URL
|
||||
echo 'travis_fold:end:httpbin'
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user