-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
31 lines (25 loc) · 1.38 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
dist: trusty
sudo: required
language: node_js
node_js:
- "12"
- "10"
- "8"
env:
global:
- CODECLIMATE_REPO_TOKEN=e3c49594443b1f9bcaf2e85f560bc6aee56ce61bb2b824b052dc1a1765e93bb6
matrix:
- PG_VERSION=11
- PG_VERSION=10
- PG_VERSION=9.6
- PG_VERSION=9.5
before_install:
- sudo service postgresql stop
- if [[ $PG_VERSION == 10 || $PG_VERSION == 11 ]] ; then wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add - ; echo "deb http://apt.postgresql.org/pub/repos/apt/ `lsb_release -cs`-pgdg main" | sudo tee /etc/apt/sources.list.d/pgdg.list ; sudo apt-get update ; sudo apt-get -y remove postgresql-9.2 postgresql-client-9.2 postgresql-9.3 postgresql-client-9.3 postgresql-9.4 postgresql-client-9.4 postgresql-9.5 postgresql-client-9.5 postgresql-9.6 postgresql-client-9.6 ; sudo apt -y install postgresql-$PG_VERSION postgresql-client-$PG_VERSION ; sudo cp /etc/postgresql/{9.6,$PG_VERSION}/main/pg_hba.conf ; fi
- sudo service postgresql restart $PG_VERSION
before_script:
- psql -c "CREATE DATABASE pgo;" -U postgres
- psql -c "ALTER DATABASE pgo SET timezone TO 'GMT';" -U postgres
- export PGO_TEST_DB="postgres://postgres@localhost/pgo"
after_script:
- if [[ `node --version` =~ ^v12 && $PG_VERSION == 11 ]] ; then npm run coverage ; npm install codeclimate-test-reporter ; codeclimate-test-reporter < coverage/lcov.info ; fi