-
Notifications
You must be signed in to change notification settings - Fork 15
/
.travis.yml
35 lines (34 loc) · 989 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
33
34
35
language: node_js
node_js:
- "10"
jobs:
include:
- name: test
before_install:
- npm install -g yarn
- yarn install
before_script:
- docker pull kodebox/codechain:v2.0.0
- docker run -d -p 8080:8080 kodebox/codechain:v2.0.0 --jsonrpc-interface 0.0.0.0 -c solo --reseal-min-period 0 --enable-devel-api
- psql -c 'CREATE DATABASE "codechain-indexer-test";' -U postgres
- psql -c "CREATE USER \"user\" WITH ENCRYPTED PASSWORD 'password';" -U postgres
- docker ps -a
script:
- set -e
- yarn run lint
- NODE_ENV=test yarn migrate
- yarn run test
- name: Check schema migration is reversable
before_install:
- npm install -g yarn
- yarn install
before_script:
- psql postgres -f create_user_and_db.sql
script:
- ./check-schema-migration-reversable.sh
services:
- docker
- postgresql
addons:
postgresql: "9.5"
cache: yarn