initial commit
This commit is contained in:
+50
@@ -0,0 +1,50 @@
|
||||
language: python
|
||||
|
||||
addons:
|
||||
apt:
|
||||
update: true
|
||||
packages: postgresql-common
|
||||
sources:
|
||||
- sourceline: deb http://apt.postgresql.org/pub/repos/apt/ xenial-pgdg main
|
||||
|
||||
jobs:
|
||||
include:
|
||||
- python: "2.7"
|
||||
env: POSTGRES=9.4
|
||||
- python: "2.7"
|
||||
env: POSTGRES=9.5
|
||||
- python: "2.7"
|
||||
env: POSTGRES=9.6
|
||||
- python: "3.6"
|
||||
env: POSTGRES=10
|
||||
- python: "3.7"
|
||||
env: POSTGRES=11
|
||||
- python: "3.8"
|
||||
env: POSTGRES=12
|
||||
|
||||
# Ensure the desired version of Postgres is installed and running
|
||||
# Most of this is normally handled by Travis automatically, but only for certain versions of Postgres
|
||||
# https://github.com/travis-ci/travis-build/blob/master/lib/travis/build/bash/travis_setup_postgresql.bash
|
||||
before_install:
|
||||
- sudo systemctl stop postgresql
|
||||
- sudo -E apt-get -yq --no-install-suggests --no-install-recommends $(travis_apt_get_options) install postgresql-$POSTGRES postgresql-plperl-$POSTGRES postgresql-plpython3-$POSTGRES
|
||||
# the port may have been auto-configured to use 5433 if it thought 5422 was already in use
|
||||
- sudo sed -i -e 's/5433/5432/' /etc/postgresql/*/main/postgresql.conf
|
||||
# postgresql-11+ default to "peer"
|
||||
- sudo sed -i -E -e 's/^local\s+all\s+postgres\s+peer/local all postgres trust/' /etc/postgresql/*/main/pg_hba.conf
|
||||
- sudo mkdir -p /var/ramfs/postgresql
|
||||
- if [ ! -d /var/ramfs/postgresql/$POSTGRES ]; then sudo cp -rp /var/lib/postgresql/$POSTGRES /var/ramfs/postgresql/$POSTGRES; fi
|
||||
- sudo systemctl start postgresql@$POSTGRES-main
|
||||
- (cd /; sudo -u postgres createuser -e -s travis || echo failed createuser)
|
||||
- (cd /; sudo -u postgres createdb -e -O travis travis || echo failed created)
|
||||
|
||||
# Ensure Postgres is configured as described in docs/testing.rst
|
||||
before_script:
|
||||
- sudo locale-gen --no-archive fr_FR.UTF-8
|
||||
- sudo mkdir -p /extra/pg/ts1 /extra/pg/ts2
|
||||
- sudo chown postgres:postgres /extra/pg/ts1 /extra/pg/ts2
|
||||
- psql -Upostgres -c "CREATE TABLESPACE ts1 LOCATION '/extra/pg/ts1'"
|
||||
- psql -Upostgres -c "CREATE TABLESPACE ts2 LOCATION '/extra/pg/ts2'"
|
||||
|
||||
script:
|
||||
- python setup.py test
|
||||
Reference in New Issue
Block a user