forked from ScorpioBroker/ScorpioBroker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
81 lines (73 loc) · 2.67 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
72
73
74
75
76
77
78
79
80
81
language: java
# use Java 8
dist: trusty
jdk:
- oraclejdk8
services:
- postgresql
addons:
postgresql: 9.6
apt:
packages:
- postgresql-9.6-postgis-2.3
- npm
install:
- psql -U postgres -c "create extension postgis;"
- psql -U postgres -c "create database ngb;"
- psql -U postgres -c "create user ngb with password 'ngb';"
- psql -U postgres -c "alter database ngb owner to ngb;"
- psql -U postgres -c "grant all privileges on database ngb to ngb;"
- psql -U postgres -c "alter role ngb superuser;"
- mkdir kafka
- cd kafka
- wget https://archive.apache.org/dist/kafka/2.2.0/kafka_2.12-2.2.0.tgz
- tar -xzf kafka_2.12-2.2.0.tgz
- kafka_2.12-2.2.0/bin/zookeeper-server-start.sh kafka_2.12-2.2.0/config/zookeeper.properties > /dev/null 2>&1 &
- sleep 12
- kafka_2.12-2.2.0/bin/kafka-server-start.sh kafka_2.12-2.2.0/config/server.properties > /dev/null 2>&1 &
- sleep 2
- cd ..
- mkdir testsuite
- cd testsuite
- curl -LO https://github.com/ScorpioBroker/NGSI-LD_TestSuite/archive/master.zip
- shasum -a 256 master.zip
- unzip -q master.zip
- rm master.zip
- cd NGSI-LD_TestSuite-master
- npm install
- cd ../..
before_script:
- cd $TRAVIS_BUILD_DIR
- mvn clean package -DskipTests -DskipDefault -PbuildForTest -B
- java -jar ./SpringCloudModules/eureka/target/eureka-server.jar > /dev/null 2>&1 &
#- java -jar ./SpringCloudModules/config-server/target/config-server.jar &
- sleep 10
- java -Dspring.profiles.active=aio -jar ./SpringCloudModules/gateway/target/gateway.jar > /dev/null 2>&1 &
- sleep 10
- java -Dspring.profiles.active=dev -jar ./AllInOneRunner/target/AllInOneRunner.jar > /dev/null 2>&1 &
- sleep 100
- while [ `curl -s -o /dev/null -w "%{http_code}" http://localhost:9090/scorpio/v1/info/` -eq 500 ]; do sleep 10; done
script:
- cd testsuite
- cd NGSI-LD_TestSuite-master
#- export EXCLUDED_TESTS="001|002|003|004|014|022|145|147|149|151|155|"
- export EXCLUDED_TESTS="055|069|070|109|158|" #last two not a valid ngsi-ld input, first three not consistend in the spec at the moment so we skipped them for now
- export TEST_ENDPOINT="http://localhost:9090"
- export ACC_ENDPOINT="http://localhost:4444"
- export NOTIFY_ENDPOINT="http://localhost:4444/acc"
- export WEB_APP_PORT=4444
- node accumulator/accumulator.js &
- npm test
- curl http://localhost:9090/scorpio/v1/info/
after_script:
- cd
- cd kafka
- kafka_2.12-2.2.0/bin/zookeeper-server-stop.sh
- kafka_2.12-2.2.0/bin/kafka-server-stop.sh
# see https://blog.travis-ci.com/2014-12-17-faster-builds-with-container-based-infrastructure
sudo: true
# cache the build tool's caches
cache:
npm: true
directories:
- $HOME/.m2