forked from opentrials/api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
32 lines (31 loc) · 827 Bytes
/
.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
language: node_js
node_js:
- 6.9.5
sudo: required
cache:
directories:
- node_modules
- .nvm
env:
global:
- NODE_ENV=test
- TEST_DATABASE_URL=postgres://postgres@localhost:5432/opentrials_api_test
- ELASTICSEARCH_URL=http://localhost:9200
- URL=http://localhost:10010
addons:
postgresql: "9.4"
services:
- postgresql
before_install:
- curl -O https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-5.6.8.deb && sudo dpkg -i --force-confnew elasticsearch-5.6.8.deb && sudo service elasticsearch restart
before_script:
- touch .env
- psql -c 'create database opentrials_api_test;' -U postgres
- npm run migrate
# Run seed twice to make sure we're cleaning the DB correctly
- npm run seed
- npm run seed
- npm run reindex
script:
- npm run e2e
- npm run coveralls