Skip to content
Snippets Groups Projects
Commit 638a7130 authored by Lukas Reschke's avatar Lukas Reschke Committed by GitHub
Browse files

Merge pull request #191 from nextcloud/ci-postgres

Add postgres to CI
parents 3985055c 6583a2fe
No related branches found
No related tags found
No related merge requests found
......@@ -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
......@@ -253,7 +253,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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment