Run petstore.swagger.io locally (#3411)

* update travis to run petstore server locally

* fix docker command

* update travis with addon

* add comment to travis.yml
This commit is contained in:
wing328 2016-07-19 22:36:10 +08:00 committed by GitHub
parent 5001b54eca
commit 72be69d2ed

View File

@ -11,11 +11,21 @@ cache:
services:
- docker
addons:
hosts:
- petstore.swagger.io
before_install:
# required when sudo: required for the Ruby petstore tests
- gem install bundler
- npm install -g typescript
- sudo pip install virtualenv
# to run petstore server locally via docker
- docker pull swaggerapi/petstore
- docker run -d -e SWAGGER_HOST=http://petstore.swagger.io -e SWAGGER_BASE_PATH=/v2 -p 80:8080 swaggerapi/petstore
- docker ps -a
# show host table to confirm petstore.swagger.io is mapped to localhost
- cat /etc/hosts
install: