-
Notifications
You must be signed in to change notification settings - Fork 139
/
.travis.yml
33 lines (29 loc) · 910 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
language: node_js
node_js:
- "16"
env:
global:
- POSTGRESQLUSER=ml4k
- POSTGRESQLPASSWORD=testdbpwd
- POSTGRESQLDATABASE=mlforkidsdb
- POSTGRESQLHOST=localhost
- POSTGRESQLPORT=5433
- DEPLOYMENT=travis
addons:
postgresql: "12"
apt:
packages:
- postgresql-12
- postgresql-client-12
before_script:
- sudo cp /etc/postgresql/10/main/pg_hba.conf /etc/postgresql/12/main/pg_hba.conf
- sudo pg_ctlcluster 12 main restart
- sh -c 'until pg_isready -p 5433; do echo "Waiting for the postgresql server..."; sleep 2; done'
- psql -U postgres -p 5433 -c "CREATE USER ml4k WITH PASSWORD 'testdbpwd' LOGIN;"
- psql -U postgres -p 5433 -c "CREATE DATABASE mlforkidsdb OWNER ml4k;"
- psql -U ml4k -p 5433 -f mlforkids-api/sql/postgresql.sql mlforkidsdb
- psql -U ml4k -p 5433 -f mlforkids-api/sql/testdata.sql mlforkidsdb
script:
- cd mlforkids-api
- npm install
- npm run build