-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
31 lines (31 loc) · 1.15 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
sudo: required
dist: trusty
language: node_js
node_js:
- "7"
install:
- sudo apt-get install python-setuptools postgresql-server-dev-9.6 postgresql-contrib libcurl4-openssl-dev
- sudo easy_install pgxnclient
- sudo pgxn install pgtap
- sudo PERL_MM_USE_DEFAULT=1 cpan TAP::Parser::SourceHandler::pgTAP
- git clone https://github.com/pramsey/pgsql-http.git && cd pgsql-http && make && sudo make install && cd ..
- npm install -g ajv-cli
- cd webapp && npm install && cd ..
addons:
postgresql: "9.6"
services:
- postgresql
before_script:
- psql -U postgres -c "CREATE DATABASE terasologykeys;"
- psql -U postgres -d terasologykeys -c "CREATE EXTENSION pgcrypto;"
- psql -U postgres -d terasologykeys -c "CREATE EXTENSION http;"
- psql -U postgres -d terasologykeys -c "CREATE EXTENSION pgtap;"
script:
# install database (test SQL syntax)
- cat sql/default-config.sql sql/main/*.sql | psql -d terasologykeys
# unit test stored procedures
- pg_prove -U postgres -d terasologykeys sql/test/*.sql
# validate JSON schemas
- ajv compile -s 'webapp/schemas/*/*.json' -r 'webapp/schemas/*/*.json'
# run integration test
- cd webapp && npm test