Add CircleCI configuration in preparation for CI test migration (#4367)

* add codeship yml

* rename ci config

* show rvm version

* use ruby-2.1.0

* check ruby version

* use rvm default

* fix host name

* set node version

* test mvn clean install

* use -q for mvn

* set memory limit

* add export MAVEN_OPTS="-Xmx512m -XX:MaxPermSize=128m"

* run test only

* update MaxPermSize to 256mb

* run mvn verify

* remove -q

* add comment

* add more comment

* restore ruby model order
This commit is contained in:
wing328 2016-12-12 17:42:08 +08:00 committed by GitHub
parent 562ff1a4e1
commit f4fb79822f

44
circle.yml Normal file
View File

@ -0,0 +1,44 @@
# work in progress: the goal is to move all the existing tests
# handled by travis-ci to circle CI so that travis-ci can test
# objc/swift API client instead
machine:
environment:
_JAVA_OPTIONS: "-Xms512m -Xmx1024m"
java:
# TODO we also need to test oraclejdk8
version: oraclejdk7
node:
version: 5.0.0
services:
- docker
# Override /etc/hosts
hosts:
petstore.swagger.io: 127.0.0.1
dependencies:
cache_directories:
- ~/.jspm
- ~/.npm
- ~/builder
- ~/.m2
pre:
- export MAVEN_OPTS="-Xmx512m -XX:MaxPermSize=256m"
- 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
override:
#- rvm --default use 2.1.0
#- ruby -v
test:
override:
- mvn verify -Psamples
#- mvn -q clean install
#- jdk_switcher use oraclejdk8
#- mvn -q clean install