-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
37 lines (34 loc) · 1.12 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
language: python
python:
- '3.7'
services:
- postgresql
addons:
postgresql: "12"
apt:
packages:
- postgresql-12
- postgresql-client-12
before_install:
# setting up postgres 12 is quite a pain, see:
# https://travis-ci.community/t/test-against-postgres-12/6768/8
- 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 DB to be up..."; sleep 2; done'
- psql -U postgres -p 5433 -c "CREATE USER testuser WITH PASSWORD 'secret' LOGIN;"
- psql -U postgres -p 5433 -c "CREATE DATABASE grammarquiz OWNER testuser;"
- psql -U testuser -p 5433 -f scripts/populate_db/schema.sql grammarquiz
- psql -U testuser -p 5433 -q -f tests/database_content.sql grammarquiz
# use v14.5.0, most recent at the moment
- nvm ls-remote
- nvm install v14.5.0
- nvm use v14.5.0
env:
global:
- PG_CONN_STR="postgresql://testuser:secret@localhost:5433/grammarquiz"
- SSO_GOOGLE_CLIENT_ID="fake"
- SSO_GOOGLE_SECRET="fake"
- SECRET_SESSION_KEY="fake"
install:
- make local-install
script: make test-all