forked from swagger-api/swagger-codegen
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml.bash
38 lines (32 loc) · 875 Bytes
/
.travis.yml.bash
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
sudo: required
language: java
dist: trusty
jdk:
- openjdk8
cache:
directories:
- $HOME/.m2
- $HOME/.ivy2
services:
- docker
addons:
hosts:
- petstore.swagger.io
before_install:
# 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
# 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
# show host table to confirm petstore.swagger.io is mapped to localhost
- cat /etc/hosts
script:
# fail fast
- set -e
# run integration tests defined in maven pom.xml
- cp pom.xml.bash pom.xml
- mvn --batch-mode verify -Psamples