From 72be69d2ed829908df09707e6adf131cf8a6ab84 Mon Sep 17 00:00:00 2001 From: wing328 Date: Tue, 19 Jul 2016 22:36:10 +0800 Subject: [PATCH] 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 --- .travis.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.travis.yml b/.travis.yml index 7b0ea4c6bf40..123e520bddcd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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: