Add mariadb 10.0 ci tests
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
parent
5e8cedab9f
commit
752718e833
37
.drone.yml
37
.drone.yml
|
@ -395,6 +395,43 @@ trigger:
|
||||||
- pull_request
|
- pull_request
|
||||||
- push
|
- push
|
||||||
|
|
||||||
|
---
|
||||||
|
kind: pipeline
|
||||||
|
name: mariadb10.0-php7.1
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: submodules
|
||||||
|
image: docker:git
|
||||||
|
commands:
|
||||||
|
- git submodule update --init
|
||||||
|
- name: mariadb10.0-php7.1
|
||||||
|
image: nextcloudci/php7.1:php7.1-16
|
||||||
|
commands:
|
||||||
|
- NOCOVERAGE=true TEST_SELECTION=DB ./autotest.sh mariadb
|
||||||
|
|
||||||
|
services:
|
||||||
|
- name: cache
|
||||||
|
image: redis
|
||||||
|
- name: mariadb
|
||||||
|
image: mariadb:10.0
|
||||||
|
environment:
|
||||||
|
MYSQL_ROOT_PASSWORD: owncloud
|
||||||
|
MYSQL_USER: oc_autotest
|
||||||
|
MYSQL_PASSWORD: owncloud
|
||||||
|
MYSQL_DATABASE: oc_autotest
|
||||||
|
tmpfs:
|
||||||
|
- /var/lib/mysql
|
||||||
|
|
||||||
|
trigger:
|
||||||
|
branch:
|
||||||
|
- master
|
||||||
|
- stable*
|
||||||
|
event:
|
||||||
|
- pull_request
|
||||||
|
- push
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
---
|
---
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
name: mysql-php7.1
|
name: mysql-php7.1
|
||||||
|
|
20
autotest.sh
20
autotest.sh
|
@ -283,12 +283,22 @@ function execute_tests {
|
||||||
echo "MariaDB is up."
|
echo "MariaDB is up."
|
||||||
|
|
||||||
else
|
else
|
||||||
if [ "MariaDB" != "$(mysql --version | grep -o MariaDB)" ] ; then
|
if [ -z "$DRONE" ] ; then # no need to drop the DB when we are on CI
|
||||||
echo "Your mysql binary is not provided by MariaDB"
|
if [ "MariaDB" != "$(mysql --version | grep -o MariaDB)" ] ; then
|
||||||
echo "To use the docker container set the USEDOCKER environment variable"
|
echo "Your mysql binary is not provided by MariaDB"
|
||||||
exit -1
|
echo "To use the docker container set the USEDOCKER environment variable"
|
||||||
|
exit -1
|
||||||
|
fi
|
||||||
|
mysql -u "$DATABASEUSER" -powncloud -e "DROP DATABASE IF EXISTS $DATABASENAME" -h $DATABASEHOST || true
|
||||||
|
else
|
||||||
|
DATABASEHOST=mariadb
|
||||||
fi
|
fi
|
||||||
mysql -u "$DATABASEUSER" -powncloud -e "DROP DATABASE IF EXISTS $DATABASENAME" -h $DATABASEHOST || true
|
fi
|
||||||
|
|
||||||
|
echo "Waiting for MariaDB initialisation ..."
|
||||||
|
if ! apps/files_external/tests/env/wait-for-connection $DATABASEHOST 3306 600; then
|
||||||
|
echo "[ERROR] Waited 600 seconds, no response" >&2
|
||||||
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#Reset _DB to mysql since that is what we use internally
|
#Reset _DB to mysql since that is what we use internally
|
||||||
|
|
Loading…
Reference in New Issue