-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
52 lines (48 loc) · 1.94 KB
/
.travis.yml
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
sudo: false
dist: trusty
language: groovy
addons:
chrome: stable
jdk: oraclejdk8
env:
- ELASTICSEARCH_VERSION=5.6.2 KIBANA_VERSION=5.6.2 CHROMEDRIVER_VERSION=2.35
install:
# install elasticsearch
- mkdir /tmp/elasticsearch-server
- wget --directory-prefix=/tmp/elasticsearch-server https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-${ELASTICSEARCH_VERSION}.tar.gz
- tar -xzf /tmp/elasticsearch-server/elasticsearch-${ELASTICSEARCH_VERSION}.tar.gz --directory /tmp/elasticsearch-server
- /tmp/elasticsearch-server/elasticsearch-${ELASTICSEARCH_VERSION}/bin/elasticsearch &
# install kibana
- mkdir /tmp/kibana-server
- wget --directory-prefix=/tmp/kibana-server https://artifacts.elastic.co/downloads/kibana/kibana-${KIBANA_VERSION}-linux-x86_64.tar.gz
- tar -xzf /tmp/kibana-server/kibana-${KIBANA_VERSION}-linux-x86_64.tar.gz --directory /tmp/kibana-server
- /tmp/kibana-server/kibana-${KIBANA_VERSION}-linux-x86_64/bin/kibana &
# install chromedriver for headless tests
- wget --directory-prefix=/tmp https://chromedriver.storage.googleapis.com/${CHROMEDRIVER_VERSION}/chromedriver_linux64.zip
- unzip -d /tmp/chromedriver /tmp/chromedriver_linux64.zip
- export PATH=$PATH:/tmp/chromedriver
# clone and prepare test applications
- git clone https://github.com/stagemonitor/stagemonitor.git
- git clone https://github.com/stagemonitor/spring-petclinic.git
- ./gradlew prepareTest
# build stagemonitor for test application
- pushd stagemonitor
- git --no-pager log -n 1 --pretty=oneline
- ./gradlew install
- popd
# start petclinic for tests
- pushd spring-petclinic
- git --no-pager log -n 1 --pretty=oneline
- ./mvnw spring-boot:run&
- popd
before_script:
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
- sleep 240 # wait for elastic / kibana / petclinic / xvfb
script:
- echo running tests....
- ./gradlew test --info --stacktrace
cache:
directories:
- $HOME/.m2
- $HOME/.gradle