aboutsummaryrefslogtreecommitdiffstats
path: root/tests/travis
diff options
context:
space:
mode:
authorKlaus Weidenbach <Klaus.Weidenbach@gmx.net>2018-03-17 21:47:02 +0100
committerKlaus Weidenbach <Klaus.Weidenbach@gmx.net>2018-03-17 23:27:56 +0100
commita732b2bca1d10fe374322fd4a8996fef6e23c11a (patch)
tree11855b43107a67367c50a8715d39ba069b8504b7 /tests/travis
parentb5cc26fe76cb43727a1e42755e1d89bbc48e0f8a (diff)
downloadvolse-hubzilla-a732b2bca1d10fe374322fd4a8996fef6e23c11a.tar.gz
volse-hubzilla-a732b2bca1d10fe374322fd4a8996fef6e23c11a.tar.bz2
volse-hubzilla-a732b2bca1d10fe374322fd4a8996fef6e23c11a.zip
:construction_worker:Extend Travis, add PostgreSQL10.
Add PostgreSQL10 to TravisCI through Docker container. Use PHP7.2 instead of PHP7.1 as default test environment. Update to current stable MariaDB 10.2 from stable (GA) 10.1.
Diffstat (limited to 'tests/travis')
-rwxr-xr-xtests/travis/prepare_pgsql.sh17
1 files changed, 11 insertions, 6 deletions
diff --git a/tests/travis/prepare_pgsql.sh b/tests/travis/prepare_pgsql.sh
index 0175b9858..c6b12e4d6 100755
--- a/tests/travis/prepare_pgsql.sh
+++ b/tests/travis/prepare_pgsql.sh
@@ -27,14 +27,19 @@ set -e
echo "Preparing for PostgreSQL ..."
+if [[ "$POSTGRESQL_VERSION" == "10" ]]; then
+ echo "Using PostgreSQL in Docker container, need to use TCP"
+ export PROTO="-h localhost"
+fi
+
# Print out some PostgreSQL information
psql --version
# Why does this hang further execution of the job?
-psql -U postgres -c "SELECT VERSION();"
+psql $PROTO -U postgres -c "SELECT VERSION();"
# Create Hubzilla database
-psql -U postgres -c "DROP DATABASE IF EXISTS travis_hubzilla;"
-psql -U postgres -v ON_ERROR_STOP=1 <<-EOSQL
+psql $PROTO -U postgres -c "DROP DATABASE IF EXISTS travis_hubzilla;"
+psql $PROTO -U postgres -v ON_ERROR_STOP=1 <<-EOSQL
CREATE USER travis_hz WITH PASSWORD 'hubzilla';
CREATE DATABASE travis_hubzilla;
ALTER DATABASE travis_hubzilla OWNER TO travis_hz;
@@ -42,8 +47,8 @@ psql -U postgres -v ON_ERROR_STOP=1 <<-EOSQL
EOSQL
# Import table structure
-psql -U travis_hz -v ON_ERROR_STOP=1 travis_hubzilla < ./install/schema_postgres.sql
+psql $PROTO -U travis_hz -v ON_ERROR_STOP=1 travis_hubzilla < ./install/schema_postgres.sql
# Show databases and tables
-psql -U postgres -l
-psql -U postgres -d travis_hubzilla -c "\dt;"
+psql $PROTO -U postgres -l
+psql $PROTO -U postgres -d travis_hubzilla -c "\dt;"