forked from loafle/openapi-generator-original
Switch Travis image from MacOS to Linux (#6937)
* remove jdk7 check * comment out some installation * update npm * comment out ts angular tests * restore ts angular2 test * restore bash test * add back new config, clean up commented items
This commit is contained in:
parent
d76e37277a
commit
fd220147ae
106
.travis.yml
106
.travis.yml
@ -1,33 +1,32 @@
|
|||||||
sudo: required
|
sudo: required
|
||||||
language: objective-c
|
language: java
|
||||||
osx_image: xcode8.2
|
jdk:
|
||||||
|
- oraclejdk8
|
||||||
|
|
||||||
cache:
|
cache:
|
||||||
directories:
|
directories:
|
||||||
- $HOME/.m2
|
- $HOME/.m2
|
||||||
- $HOME/.ivy2
|
- $HOME/.ivy2
|
||||||
- $HOME/.gradle/caches/
|
- $HOME/.gradle/caches/
|
||||||
- $HOME/.gradle/wrapper/
|
- $HOME/.gradle/wrapper/
|
||||||
- $HOME/.stack
|
|
||||||
- $HOME/samples/client/petstore/php/SwaggerClient-php/vendor
|
- $HOME/samples/client/petstore/php/SwaggerClient-php/vendor
|
||||||
- $HOME/samples/client/petstore/ruby/venodr/bundle
|
- $HOME/samples/client/petstore/ruby/venodr/bundle
|
||||||
- $HOME/samples/client/petstore/python/.venv/
|
- $HOME/samples/client/petstore/python/.venv/
|
||||||
# - $HOME/samples/client/petstore/typescript-node/npm/node_modules
|
- $HOME/samples/client/petstore/typescript-node/npm/node_modules
|
||||||
# - $HOME/samples/client/petstore/typescript-node/npm/typings/
|
- $HOME/samples/client/petstore/typescript-node/npm/typings/
|
||||||
# - $HOME/samples/client/petstore/typescript-fetch/tests/default/node_modules
|
- $HOME/samples/client/petstore/typescript-fetch/tests/default/node_modules
|
||||||
# - $HOME/samples/client/petstore/typescript-fetch/tests/default/typings
|
- $HOME/samples/client/petstore/typescript-fetch/tests/default/typings
|
||||||
# - $HOME/samples/client/petstore/typescript-fetch/builds/default/node_modules
|
- $HOME/samples/client/petstore/typescript-fetch/builds/default/node_modules
|
||||||
# - $HOME/samples/client/petstore/typescript-fetch/builds/default/typings
|
- $HOME/samples/client/petstore/typescript-fetch/builds/default/typings
|
||||||
# - $HOME/samples/client/petstore/typescript-fetch/builds/es6-target/node_modules
|
- $HOME/samples/client/petstore/typescript-fetch/builds/es6-target/node_modules
|
||||||
# - $HOME/samples/client/petstore/typescript-fetch/builds/es6-target/typings
|
- $HOME/samples/client/petstore/typescript-fetch/builds/es6-target/typings
|
||||||
# - $HOME/samples/client/petstore/typescript-fetch/builds/with-npm-version/node_modules
|
- $HOME/samples/client/petstore/typescript-fetch/builds/with-npm-version/node_modules
|
||||||
# - $HOME/samples/client/petstore/typescript-fetch/npm/with-npm-version/typings
|
- $HOME/samples/client/petstore/typescript-fetch/npm/with-npm-version/typings
|
||||||
# - $HOME/samples/client/petstore/typescript-angularjs/node_modules
|
- $HOME/samples/client/petstore/typescript-angular/node_modules
|
||||||
# - $HOME/samples/client/petstore/typescript-angularjs/typings
|
- $HOME/samples/client/petstore/typescript-angular/typings
|
||||||
- $HOME/.cocoapods/repos/master
|
|
||||||
timeout: 1000
|
services:
|
||||||
# note: docker is not yet supported in iOS build
|
- docker
|
||||||
#services:
|
|
||||||
# - docker
|
|
||||||
|
|
||||||
# comment out the host table change to use the public petstore server
|
# comment out the host table change to use the public petstore server
|
||||||
addons:
|
addons:
|
||||||
@ -35,60 +34,38 @@ addons:
|
|||||||
- petstore.swagger.io
|
- petstore.swagger.io
|
||||||
|
|
||||||
before_install:
|
before_install:
|
||||||
- export SW=`pwd`
|
# required when sudo: required for the Ruby petstore tests
|
||||||
- rvm list
|
- gem install bundler
|
||||||
- rvm use 2.2.5
|
|
||||||
- gem environment
|
|
||||||
- gem install bundler -N --no-ri --no-rdoc
|
|
||||||
- gem install cocoapods -v 1.2.1 -N --no-ri --no-rdoc
|
|
||||||
- gem install xcpretty -N --no-ri --no-rdoc
|
|
||||||
- pod --version
|
|
||||||
# comment out below to avoid errors
|
|
||||||
#- pod repo update
|
|
||||||
- pod setup --silent > /dev/null
|
|
||||||
- npm install -g typescript
|
- npm install -g typescript
|
||||||
|
- npm install -g npm
|
||||||
- npm config set registry http://registry.npmjs.org/
|
- npm config set registry http://registry.npmjs.org/
|
||||||
- brew install sbt
|
- sudo pip install virtualenv
|
||||||
- brew install leiningen
|
|
||||||
- brew install bats
|
|
||||||
- brew install curl
|
|
||||||
- brew install python3
|
|
||||||
- pip install virtualenv
|
|
||||||
- mkdir -p ~/.local/bin
|
|
||||||
- export PATH=$HOME/.local/bin:$PATH
|
|
||||||
- travis_retry curl --insecure -L https://www.stackage.org/stack/osx-x86_64 | tar xz --strip-components=1 --include '*/stack' -C ~/.local/bin
|
|
||||||
# start local petstore server
|
|
||||||
- git clone -b docker --single-branch https://github.com/wing328/swagger-samples
|
|
||||||
- cd swagger-samples/java/java-jersey-jaxrs
|
|
||||||
- sudo mvn jetty:run &
|
|
||||||
- cd $SW
|
|
||||||
# NOTE: iOS build not support docker at the moment
|
|
||||||
# to run petstore server locally via docker
|
# to run petstore server locally via docker
|
||||||
#- docker pull swaggerapi/petstore
|
- 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 run -d -e SWAGGER_HOST=http://petstore.swagger.io -e SWAGGER_BASE_PATH=/v2 -p 80:8080 swaggerapi/petstore
|
||||||
#- docker ps -a
|
- docker ps -a
|
||||||
|
# Add bats test framework and cURL for Bash script integration tests
|
||||||
|
- sudo add-apt-repository ppa:duggan/bats --yes
|
||||||
|
- sudo apt-get update -qq
|
||||||
|
- sudo apt-get install -qq bats
|
||||||
|
- sudo apt-get install -qq curl
|
||||||
|
# comment out below as installation failed in travis
|
||||||
# Add rebar3 build tool and recent Erlang/OTP for Erlang petstore server tests.
|
# Add rebar3 build tool and recent Erlang/OTP for Erlang petstore server tests.
|
||||||
# - Travis CI does not support rebar3 [yet](https://github.com/travis-ci/travis-ci/issues/6506#issuecomment-275189490).
|
# - Travis CI does not support rebar3 [yet](https://github.com/travis-ci/travis-ci/issues/6506#issuecomment-275189490).
|
||||||
# - Rely on `kerl` for [pre-compiled versions available](https://docs.travis-ci.com/user/languages/erlang#Choosing-OTP-releases-to-test-against). Rely on installation path chosen by [`travis-erlang-builder`](https://github.com/travis-ci/travis-erlang-builder/blob/e6d016b1a91ca7ecac5a5a46395bde917ea13d36/bin/compile#L18).
|
# - Rely on `kerl` for [pre-compiled versions available](https://docs.travis-ci.com/user/languages/erlang#Choosing-OTP-releases-to-test-against). Rely on installation path chosen by [`travis-erlang-builder`](https://github.com/travis-ci/travis-erlang-builder/blob/e6d016b1a91ca7ecac5a5a46395bde917ea13d36/bin/compile#L18).
|
||||||
|
# - . ~/otp/18.2.1/activate && erl -version
|
||||||
|
#- curl -f -L -o ./rebar3 https://s3.amazonaws.com/rebar3/rebar3 && chmod +x ./rebar3 && ./rebar3 version && export PATH="${TRAVIS_BUILD_DIR}:$PATH"
|
||||||
|
|
||||||
# show host table to confirm petstore.swagger.io is mapped to localhost
|
# show host table to confirm petstore.swagger.io is mapped to localhost
|
||||||
- cat /etc/hosts
|
- cat /etc/hosts
|
||||||
# show java version
|
# show java version
|
||||||
- java -version
|
- java -version
|
||||||
# show brew version
|
|
||||||
- brew --version
|
|
||||||
# show xcpretty version
|
|
||||||
- xcpretty -v
|
|
||||||
# show go version
|
|
||||||
- go version
|
|
||||||
# show stack version
|
|
||||||
- stack --version
|
|
||||||
|
|
||||||
install:
|
install:
|
||||||
# Add Godeps dependencies to GOPATH and PATH
|
# Add Godeps dependencies to GOPATH and PATH
|
||||||
- eval "$(curl -sL https://raw.githubusercontent.com/travis-ci/gimme/master/gimme | GIMME_GO_VERSION=1.4 bash)"
|
- eval "$(curl -sL https://raw.githubusercontent.com/travis-ci/gimme/master/gimme | GIMME_GO_VERSION=1.4 bash)"
|
||||||
- export GOPATH="${TRAVIS_BUILD_DIR}/Godeps/_workspace"
|
- export GOPATH="${TRAVIS_BUILD_DIR}/Godeps/_workspace"
|
||||||
- export PATH="${TRAVIS_BUILD_DIR}/Godeps/_workspace/bin:$PATH"
|
- export PATH="${TRAVIS_BUILD_DIR}/Godeps/_workspace/bin:$PATH"
|
||||||
|
|
||||||
script:
|
script:
|
||||||
# fail fast
|
# fail fast
|
||||||
@ -100,14 +77,12 @@ script:
|
|||||||
# fail if generators contain tab '\t'
|
# fail if generators contain tab '\t'
|
||||||
- /bin/bash ./bin/utils/detect_tab_in_java_class.sh
|
- /bin/bash ./bin/utils/detect_tab_in_java_class.sh
|
||||||
# run integration tests defined in maven pom.xml
|
# run integration tests defined in maven pom.xml
|
||||||
- travis_wait mvn -q --batch-mode verify -Psamples
|
- mvn -q --batch-mode verify -Psamples
|
||||||
### docker-related tasks have been moved to CircleCI
|
# Below has been moved to CircleCI
|
||||||
# docker: build generator image and push to Docker Hub
|
# docker: build generator image and push to Docker Hub
|
||||||
#- if [ $DOCKER_HUB_USERNAME ]; then docker login --email=$DOCKER_HUB_EMAIL --username=$DOCKER_HUB_USERNAME --password=$DOCKER_HUB_PASSWORD && docker build -t $DOCKER_GENERATOR_IMAGE_NAME ./modules/swagger-generator && if [ ! -z "$TRAVIS_TAG" ]; then docker tag $DOCKER_GENERATOR_IMAGE_NAME:latest $DOCKER_GENERATOR_IMAGE_NAME:$TRAVIS_TAG; fi && if [ ! -z "$TRAVIS_TAG" ] || [ "$TRAVIS_BRANCH" = "master" ]; then docker push $DOCKER_GENERATOR_IMAGE_NAME; fi; fi
|
#- if [ $DOCKER_HUB_USERNAME ]; then docker login --email=$DOCKER_HUB_EMAIL --username=$DOCKER_HUB_USERNAME --password=$DOCKER_HUB_PASSWORD && docker build -t $DOCKER_GENERATOR_IMAGE_NAME ./modules/swagger-generator && if [ ! -z "$TRAVIS_TAG" ]; then docker tag $DOCKER_GENERATOR_IMAGE_NAME:latest $DOCKER_GENERATOR_IMAGE_NAME:$TRAVIS_TAG; fi && if [ ! -z "$TRAVIS_TAG" ] || [ "$TRAVIS_BRANCH" = "master" ]; then docker push $DOCKER_GENERATOR_IMAGE_NAME; fi; fi
|
||||||
## docker: build cli image and push to Docker Hub
|
## docker: build cli image and push to Docker Hub
|
||||||
#- if [ $DOCKER_HUB_USERNAME ]; then docker login --email=$DOCKER_HUB_EMAIL --username=$DOCKER_HUB_USERNAME --password=$DOCKER_HUB_PASSWORD && docker build -t $DOCKER_CODEGEN_CLI_IMAGE_NAME ./modules/swagger-codegen-cli && if [ ! -z "$TRAVIS_TAG" ]; then docker tag $DOCKER_CODEGEN_CLI_IMAGE_NAME:latest $DOCKER_CODEGEN_CLI_IMAGE_NAME:$TRAVIS_TAG; fi && if [ ! -z "$TRAVIS_TAG" ] || [ "$TRAVIS_BRANCH" = "master" ]; then docker push $DOCKER_CODEGEN_CLI_IMAGE_NAME; fi; fi
|
#- if [ $DOCKER_HUB_USERNAME ]; then docker login --email=$DOCKER_HUB_EMAIL --username=$DOCKER_HUB_USERNAME --password=$DOCKER_HUB_PASSWORD && docker build -t $DOCKER_CODEGEN_CLI_IMAGE_NAME ./modules/swagger-codegen-cli && if [ ! -z "$TRAVIS_TAG" ]; then docker tag $DOCKER_CODEGEN_CLI_IMAGE_NAME:latest $DOCKER_CODEGEN_CLI_IMAGE_NAME:$TRAVIS_TAG; fi && if [ ! -z "$TRAVIS_TAG" ] || [ "$TRAVIS_BRANCH" = "master" ]; then docker push $DOCKER_CODEGEN_CLI_IMAGE_NAME; fi; fi
|
||||||
#env:
|
|
||||||
# - DOCKER_GENERATOR_IMAGE_NAME=swaggerapi/swagger-generator DOCKER_CODEGEN_CLI_IMAGE_NAME=swaggerapi/swagger-codegen-cli
|
|
||||||
|
|
||||||
after_success:
|
after_success:
|
||||||
# push a snapshot version to maven repo
|
# push a snapshot version to maven repo
|
||||||
@ -115,3 +90,6 @@ after_success:
|
|||||||
mvn clean deploy --settings .travis/settings.xml;
|
mvn clean deploy --settings .travis/settings.xml;
|
||||||
echo "Finished mvn clean deploy for $TRAVIS_BRANCH";
|
echo "Finished mvn clean deploy for $TRAVIS_BRANCH";
|
||||||
fi;
|
fi;
|
||||||
|
|
||||||
|
env:
|
||||||
|
- DOCKER_GENERATOR_IMAGE_NAME=swaggerapi/swagger-generator DOCKER_CODEGEN_CLI_IMAGE_NAME=swaggerapi/swagger-codegen-cli
|
||||||
|
19
pom.xml
19
pom.xml
@ -837,18 +837,13 @@
|
|||||||
</property>
|
</property>
|
||||||
</activation>
|
</activation>
|
||||||
<modules>
|
<modules>
|
||||||
<!-- servers -->
|
|
||||||
<module>samples/server/petstore/scalatra</module>
|
|
||||||
<!-- <module>samples/server/petstore/erlang-server</module> note: make sample compilation work -->
|
<!-- <module>samples/server/petstore/erlang-server</module> note: make sample compilation work -->
|
||||||
<!-- clients -->
|
<!-- clients -->
|
||||||
<!--<module>samples/client/petstore/bash</module>-->
|
|
||||||
<module>samples/client/petstore/ruby</module>
|
<module>samples/client/petstore/ruby</module>
|
||||||
<module>samples/client/petstore/scala</module>
|
<module>samples/client/petstore/scala</module>
|
||||||
<module>samples/client/petstore/akka-scala</module>
|
<module>samples/client/petstore/akka-scala</module>
|
||||||
<module>samples/client/petstore/javascript</module>
|
<module>samples/client/petstore/javascript</module>
|
||||||
<module>samples/client/petstore/python</module>
|
<module>samples/client/petstore/python</module>
|
||||||
<!-- <module>samples/client/petstore/haskell-http-client</module> -->
|
|
||||||
<!-- <module>samples/client/petstore/haskell-http-client/tests-integration</module> -->
|
|
||||||
<module>samples/client/petstore/typescript-fetch/builds/default</module>
|
<module>samples/client/petstore/typescript-fetch/builds/default</module>
|
||||||
<module>samples/client/petstore/typescript-fetch/builds/es6-target</module>
|
<module>samples/client/petstore/typescript-fetch/builds/es6-target</module>
|
||||||
<module>samples/client/petstore/typescript-fetch/builds/with-npm-version</module>
|
<module>samples/client/petstore/typescript-fetch/builds/with-npm-version</module>
|
||||||
@ -858,20 +853,10 @@
|
|||||||
<module>samples/client/petstore/typescript-angularjs</module>-->
|
<module>samples/client/petstore/typescript-angularjs</module>-->
|
||||||
<!-- comment out due to error `npm run build`
|
<!-- comment out due to error `npm run build`
|
||||||
<module>samples/client/petstore/typescript-jquery/npm</module>-->
|
<module>samples/client/petstore/typescript-jquery/npm</module>-->
|
||||||
<module>samples/client/petstore/typescript-angular-v2/npm</module>
|
<!--<module>samples/client/petstore/typescript-angular-v2/npm</module>-->
|
||||||
<module>samples/client/petstore/typescript-angular-v4/npm</module>
|
<module>samples/client/petstore/typescript-angular-v4/npm</module>
|
||||||
<module>samples/client/petstore/typescript-angular-v4.3/npm</module>
|
<module>samples/client/petstore/typescript-angular-v4.3/npm</module>
|
||||||
<!-- comment out due to https://github.com/swagger-api/swagger-codegen/issues/6658
|
<!--<module>samples/client/petstore/bash</module>-->
|
||||||
<module>samples/client/petstore/swift3/default/SwaggerClientTests</module>
|
|
||||||
<module>samples/client/petstore/swift3/promisekit/SwaggerClientTests</module>
|
|
||||||
<module>samples/client/petstore/swift3/rxswift/SwaggerClientTests</module>
|
|
||||||
<module>samples/client/petstore/swift/default/SwaggerClientTests</module>
|
|
||||||
<module>samples/client/petstore/swift/promisekit/SwaggerClientTests</module>
|
|
||||||
<module>samples/client/petstore/swift/rxswift/SwaggerClientTests</module>
|
|
||||||
-->
|
|
||||||
<!-- comment out objc tests as it's timing out
|
|
||||||
<module>samples/client/petstore/objc/default/SwaggerClientTests</module>
|
|
||||||
<module>samples/client/petstore/objc/core-data/SwaggerClientTests</module>-->
|
|
||||||
</modules>
|
</modules>
|
||||||
</profile>
|
</profile>
|
||||||
</profiles>
|
</profiles>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user