-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path.travis.yml
42 lines (36 loc) · 1.34 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
sudo: required
language: node_js
node_js: 8.3.0
cache: npm
git: { depth: 3 }
env:
- ES_VERSION=5.1.1 ES_DOWNLOAD_URL=https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-${ES_VERSION}.tar.gz
service:
- mysql
- postgres
- rabbitmq
cache:
yarn: true
directories:
- node_modules
install:
- yarn install
- mysql -e 'CREATE DATABASE testdb; CREATE TABLE testdb.table1 (`id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(20) NOT NULL, PRIMARY KEY (`id`)) ENGINE=InnoDB DEFAULT CHARSET=UTF8'
- mysql -e 'INSERT INTO testdb.table1 (name) VALUES ("User 1"),("User 2"),("User 3");'
- psql -c 'Create database testdb;' -U postgres
- psql -d testdb -c 'CREATE TABLE table1 (name varchar(20) not null);' -U postgres
- psql -d testdb -c "INSERT INTO table1 (name) VALUES ('User 1'),('User 2'),('User 3');" -U postgres
- wget ${ES_DOWNLOAD_URL}
- tar -xzf elasticsearch-${ES_VERSION}.tar.gz
- ./elasticsearch-${ES_VERSION}/bin/elasticsearch &
before_script:
- sudo rabbitmq-plugins enable rabbitmq_management
- sudo service rabbitmq-server restart
- wget http://127.0.0.1:15672/cli/rabbitmqadmin
- chmod +x rabbitmqadmin
- ./rabbitmqadmin import ./itest/rabbitmq/definitions.json
script:
- wget -q --waitretry=1 --retry-connrefused -T 10 -O - http://127.0.0.1:9200
- npm test
- npm run itest
- npm run coverage