forked from cloudfoundry/app-autoscaler
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
71 lines (62 loc) · 2.66 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
language: java
dist: trusty
sudo: required
jdk:
- openjdk8
services:
- postgresql
addons:
postgresql: "9.4"
env:
global:
- DBURL=postgres://postgres@localhost/autoscaler?sslmode=disable
- NODE_VERSION=6.2
- GO_VERSION=1.7
before_install:
- source .envrc
install:
- mvn package
- npm install npm@latest -g
- nvm install $NODE_VERSION
- eval "$(gimme $GO_VERSION)"
- go install github.com/onsi/ginkgo/ginkgo
- curl -L -o consul-0.7.5.zip https://releases.hashicorp.com/consul/0.7.5/consul_0.7.5_linux_amd64.zip
- unzip consul-0.7.5.zip -d $GOPATH/bin
- rm consul-0.7.5.zip
before_script:
- nvm use $NODE_VERSION
- psql -c 'CREATE DATABASE autoscaler' -U postgres
- java -cp 'db/target/lib/*' liquibase.integration.commandline.Main --url jdbc:postgresql://127.0.0.1/autoscaler --driver=org.postgresql.Driver --changeLogFile=api/db/api.db.changelog.yml update
- java -cp 'db/target/lib/*' liquibase.integration.commandline.Main --url jdbc:postgresql://127.0.0.1/autoscaler --driver=org.postgresql.Driver --changeLogFile=servicebroker/db/servicebroker.db.changelog.json update
- java -cp 'db/target/lib/*' liquibase.integration.commandline.Main --url jdbc:postgresql://127.0.0.1/autoscaler --driver=org.postgresql.Driver --changeLogFile=scheduler/db/scheduler.changelog-master.yaml update
- java -cp 'db/target/lib/*' liquibase.integration.commandline.Main --url jdbc:postgresql://127.0.0.1/autoscaler --driver=org.postgresql.Driver --changeLogFile=scheduler/db/quartz.changelog-master.yaml update
- java -cp 'db/target/lib/*' liquibase.integration.commandline.Main --url jdbc:postgresql://127.0.0.1/autoscaler --driver=org.postgresql.Driver --changeLogFile=src/autoscaler/metricscollector/db/metricscollector.db.changelog.yml update
- java -cp 'db/target/lib/*' liquibase.integration.commandline.Main --url jdbc:postgresql://127.0.0.1/autoscaler --driver=org.postgresql.Driver --changeLogFile=src/autoscaler/eventgenerator/db/dataaggregator.db.changelog.yml update
- java -cp 'db/target/lib/*' liquibase.integration.commandline.Main --url jdbc:postgresql://127.0.0.1/autoscaler --driver=org.postgresql.Driver --changeLogFile=src/autoscaler/scalingengine/db/scalingengine.db.changelog.yml update
script:
# Unit test
- pushd api
- npm install
- npm test
- popd
- pushd servicebroker
- npm install
- npm test
- popd
- pushd src/autoscaler
- ginkgo -r -race -randomizeAllSpecs
- popd
- pushd scheduler
- mvn test
- popd
# Integration test
- pushd api
- npm install
- popd
- pushd servicebroker
- npm install
- popd
- pushd scheduler
- mvn package -DskipTests
- popd
- ginkgo -r -race -randomizeAllSpecs src/integration