summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarius Blüm <marius@lineone.io>2016-06-21 21:23:20 +0200
committerGitHub <noreply@github.com>2016-06-21 21:23:20 +0200
commitce3437e755acddc74aa4794331a95f31c8660f4b (patch)
treebbcb11837ebf559c644d05a04b3e1d0aac89f54a
parent0236535fd3e98a23a1fd3d4adfa472050a6c146e (diff)
parent8153290dd63b2aa781957281a2f4bcd008dd3bb0 (diff)
downloadnextcloud-server-ce3437e755acddc74aa4794331a95f31c8660f4b.tar.gz
nextcloud-server-ce3437e755acddc74aa4794331a95f31c8660f4b.zip
Merge pull request #193 from nextcloud/stable9-backport-191
[stable9] Add postgres to CI
-rw-r--r--.drone.yml12
-rwxr-xr-xautotest.sh4
2 files changed, 15 insertions, 1 deletions
diff --git a/.drone.yml b/.drone.yml
index 9fde7b6ce5b..4d0a0aba2a8 100644
--- a/.drone.yml
+++ b/.drone.yml
@@ -17,7 +17,19 @@ build:
- git submodule update --init
- ./occ maintenance:install --database-name oc_autotest --database-user oc_autotest --admin-user admin --admin-pass admin --database sqlite --database-pass=''
- ./autotest.sh sqlite
+ postgres:
+ image: morrisjobke/nextcloud-ci-php7:1.0
+ commands:
+ - sleep 10 # gives the database enough time to initialize
+ - rm -rf data/* config/config.php # TODO: remove this - temporary fix for CI issues
+ - git submodule update --init
+ - ./autotest.sh pgsql
compose:
cache:
image: redis
+ postgres:
+ image: postgres
+ environment:
+ - POSTGRES_USER=oc_autotest
+ - POSTGRES_PASSWORD=oc_autotest
diff --git a/autotest.sh b/autotest.sh
index 1fa9df18d75..6b587c756be 100755
--- a/autotest.sh
+++ b/autotest.sh
@@ -226,7 +226,9 @@ function execute_tests {
echo "Postgres is up."
else
- dropdb -U "$DATABASEUSER" "$DATABASENAME" || true
+ if [ -z "$DRONE" ] ; then # no need to drop the DB when we are on CI
+ dropdb -U "$DATABASEUSER" "$DATABASENAME" || true
+ fi
fi
fi
if [ "$DB" == "oci" ] ; then