mirror of
https://github.com/valitydev/openapi-generator.git
synced 2024-11-06 10:35:25 +00:00
89464cbe5f
Update pom.xml for CircleCI to test java-related projects only
35 lines
845 B
YAML
35 lines
845 B
YAML
# Java-related client, server tests
|
|
machine:
|
|
java:
|
|
version: openjdk8
|
|
services:
|
|
- docker
|
|
# Override /etc/hosts
|
|
hosts:
|
|
petstore.swagger.io: 127.0.0.1
|
|
|
|
dependencies:
|
|
cache_directories:
|
|
- "~/.m2"
|
|
- "~/.sbt"
|
|
|
|
pre:
|
|
# 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:
|
|
- cp pom.xml.circleci pom.xml
|
|
|
|
test:
|
|
override:
|
|
# test with jdk8
|
|
- java -version
|
|
- mvn -q clean verify -Psamples
|
|
# test with jdk7
|
|
- sudo update-java-alternatives -s java-1.7.0-openjdk-amd64
|
|
- java -version
|
|
- mvn -q clean verify -Psamples
|