File tree Expand file tree Collapse file tree 1 file changed +31
-1
lines changed Expand file tree Collapse file tree 1 file changed +31
-1
lines changed Original file line number Diff line number Diff line change 11language : " python"
22
3+ sudo : required
4+
5+ services :
6+ - postgresql
7+
8+ env :
9+ - PGVERSION=9.5
10+ - PGVERSION=9.6
11+
312python :
413 - " 2.7"
514 - " 3.3"
@@ -8,10 +17,31 @@ python:
817 - " pypy"
918 - " pypy3"
1019
20+ before_install :
21+ - packages="postgresql-$PGVERSION postgresql-server-dev-$PGVERSION postgresql-common"
22+ - wget https://raw.githubusercontent.com/postgrespro/pg_pathman/master/travis/apt.postgresql.org.sh
23+ - sudo sh ./apt.postgresql.org.sh
24+
1125install :
12- - pip install flake8
26+ - sudo apt-get update
27+ - sudo service postgresql stop
28+ - echo 'exit 0' | sudo tee /etc/init.d/postgresql
29+ - sudo chmod a+x /etc/init.d/postgresql
30+ - sudo apt-get -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" install $packages
31+
32+ before_script :
33+ - sudo pg_createcluster --start $PGVERSION testgres -- -A trust
34+ - sudo chmod a+w /var/run/postgresql/
35+ - sudo /etc/init.d/postgresql restart
36+ - export PG_CONFIG=/usr/lib/postgresql/$PGVERSION/bin/pg_config
37+ - virtualenv /tmp/envs/testgres
38+ - source /tmp/envs/testgres/bin/activate
39+ - pip install six psycopg2 pg8000 flake8
40+ - python setup.py install
1341
1442script :
43+ - cd testgres/tests
44+ - python -m unittest test_simple
1545 - flake8 --ignore=W191,F401,E501,F403 .
1646
1747notifications :
You can’t perform that action at this time.
0 commit comments