-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.travis.yml
73 lines (65 loc) · 2.58 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
sudo: true
language: python
python:
- 2.7
- 3.4
- 3.6
compiler:
- clang
- gcc
env:
matrix:
- PGVERSION=9.6
- PGVERSION=9.5
- PGVERSION=9.4
- PGVERSION=9.3
- PGVERSION=9.2
- PGVERSION=9.1
before_install:
# Set up PostgreSQL
- psql --version
- sudo /etc/init.d/postgresql stop
- sudo apt-get -y --purge remove postgresql libpq-dev libpq5 postgresql-client-common postgresql-common
- sudo rm -rf /var/lib/postgresql
- wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
- sudo sh -c "echo deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main $PGVERSION >> /etc/apt/sources.list.d/postgresql.list"
- sudo sh -c "echo deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg-testing main $PGVERSION >> /etc/apt/sources.list.d/postgresql.list"
- sudo apt-get update -qq
- sudo apt-get -y -o Dpkg::Options::=--force-confdef -o Dpkg::Options::="--force-confnew" install postgresql-$PGVERSION postgresql-server-dev-$PGVERSION
- sudo chmod 777 /etc/postgresql/$PGVERSION/main/pg_hba.conf
- sudo echo "local all postgres trust" > /etc/postgresql/$PGVERSION/main/pg_hba.conf
- sudo echo "local all all trust" >> /etc/postgresql/$PGVERSION/main/pg_hba.conf
- sudo echo "host all all 127.0.0.1/32 trust" >> /etc/postgresql/$PGVERSION/main/pg_hba.conf
- sudo echo "host all all ::1/128 trust" >> /etc/postgresql/$PGVERSION/main/pg_hba.conf
- sudo /etc/init.d/postgresql restart
- createuser -U postgres -s travis
# Download and install Q3C
- git clone https://github.com/segasai/q3c.git
- cd q3c
- make
- sudo make install
- cd ../
# Set up goto/wdsb relationship
- psql -U postgres -c 'CREATE USER goto'
- psql -U postgres -c 'CREATE DATABASE wsdb'
- psql -U postgres -c "ALTER USER goto WITH PASSWORD '$GOTO_PASSWORD'"
- psql -U postgres -c 'ALTER DATABASE wsdb OWNER TO goto'
- psql -U postgres -d wsdb -c 'CREATE EXTENSION q3c'
# Set up Python
- wget http://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O miniconda.sh
- chmod +x miniconda.sh
- ./miniconda.sh -b
- export PATH=/home/travis/miniconda2/bin:$PATH
install:
- conda install --yes python=$TRAVIS_PYTHON_VERSION numpy astropy psycopg2 nose
- python setup.py install
script:
- nosetests #--with-coverage --cover-package=wsdb
#after_success:
# - coveralls
notifications:
email:
recipients:
on_success: change
on_failure: change