Added travis configuration for CI tests
This commit is contained in:
parent
d0217d81e3
commit
2a9ca79772
22
.travis.yml
Normal file
22
.travis.yml
Normal file
@ -0,0 +1,22 @@
|
||||
# Travis CI configuration file for psycopg2
|
||||
|
||||
dist: trusty
|
||||
sudo: required
|
||||
|
||||
env:
|
||||
- PGVER=9.6
|
||||
- PGVER=9.5
|
||||
- PGVER=9.4
|
||||
- PGVER=9.3
|
||||
- PGVER=9.2
|
||||
|
||||
install:
|
||||
- source regress/travis_prepare.sh
|
||||
- make
|
||||
- sudo make install
|
||||
|
||||
script:
|
||||
- regress/travis_test.sh
|
||||
|
||||
notifications:
|
||||
email: false
|
@ -7,6 +7,12 @@ pg_repack -- Reorganize tables in PostgreSQL databases with minimal locks
|
||||
- Bug Report: https://github.com/reorg/pg_repack/issues
|
||||
- Mailing List: http://pgfoundry.org/mailman/listinfo/reorg-general
|
||||
|
||||
|travis|
|
||||
|
||||
.. |travis| image:: https://travis-ci.org/reorg/pg_repack.svg?branch=master
|
||||
:target: https://travis-ci.org/reorg/pg_repack
|
||||
:alt: Linux and OSX build status
|
||||
|
||||
pg_repack_ is a PostgreSQL extension which lets you remove bloat from
|
||||
tables and indexes, and optionally restore the physical order of clustered
|
||||
indexes. Unlike CLUSTER_ and `VACUUM FULL`_ it works online, without
|
||||
|
29
regress/travis_prepare.sh
Executable file
29
regress/travis_prepare.sh
Executable file
@ -0,0 +1,29 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e -x
|
||||
|
||||
export PACKAGE="$PGVER"
|
||||
export PGDIR="/usr/lib/postgresql/$PACKAGE"
|
||||
export CONFDIR="/etc/postgresql/$PACKAGE/main"
|
||||
export DATADIR="/var/lib/postgresql/$PACKAGE/main"
|
||||
export PGBIN="$PGDIR/bin"
|
||||
export PATH="$PGBIN:$PATH"
|
||||
|
||||
# Match libpq and server-dev packages
|
||||
# See https://github.com/reorg/pg_repack/issues/63
|
||||
sudo sed -i "s/main[[:space:]]*$/main ${PGVER}/" \
|
||||
/etc/apt/sources.list.d/pgdg.list
|
||||
sudo apt-get update
|
||||
sudo apt-get remove -y libpq5
|
||||
sudo apt-get install -y "libpq5=${PGVER}*" "libpq-dev=${PGVER}*"
|
||||
sudo apt-mark hold libpq5
|
||||
sudo apt-get install -y postgresql-server-dev-$PGVER postgresql-$PGVER
|
||||
|
||||
# Go somewhere else or sudo will fail
|
||||
cd /
|
||||
# Already started because of installing posgresql-$PGVER
|
||||
# sudo -u postgres "$PGBIN/pg_ctl" -w -l /dev/null -D "$CONFDIR" start
|
||||
sudo -u postgres mkdir -p /var/lib/postgresql/testts
|
||||
sudo -u postgres "$PGBIN/psql" \
|
||||
-c "create tablespace testts location '/var/lib/postgresql/testts'"
|
||||
cd -
|
10
regress/travis_test.sh
Executable file
10
regress/travis_test.sh
Executable file
@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -x
|
||||
|
||||
export PG_REGRESS_DIFF_OPTS=-u
|
||||
|
||||
if ! make installcheck; then
|
||||
cat regress/regression.diffs
|
||||
exit 1
|
||||
fi
|
Loading…
x
Reference in New Issue
Block a user