Merge pull request #4665 from nextcloud/enable-redis

Add redis support to our CI jobs
This commit is contained in:
Morris Jobke 2017-05-02 17:16:19 -03:00 committed by GitHub
commit f233e856bf
3 changed files with 36 additions and 0 deletions

View File

@ -553,11 +553,14 @@ matrix:
- TESTS: translation-check - TESTS: translation-check
- TESTS: htaccess-checker - TESTS: htaccess-checker
- TESTS: nodb-codecov - TESTS: nodb-codecov
ENABLE_REDIS: true
- TESTS: db-codecov - TESTS: db-codecov
ENABLE_REDIS: true
- TESTS: integration-capabilities_features - TESTS: integration-capabilities_features
- TESTS: integration-federation_features - TESTS: integration-federation_features
- TESTS: integration-maintenance-mode - TESTS: integration-maintenance-mode
- TESTS: integration-ratelimiting - TESTS: integration-ratelimiting
ENABLE_REDIS: true
- TESTS: integration-auth - TESTS: integration-auth
- TESTS: integration-carddav - TESTS: integration-carddav
- TESTS: integration-dav-v2 - TESTS: integration-dav-v2
@ -605,28 +608,41 @@ matrix:
- TESTS: sqlite-php7.0-samba-non-native - TESTS: sqlite-php7.0-samba-non-native
- TEST: memcache-memcached - TEST: memcache-memcached
- TESTS: sqlite-php7.0-webdav-apache - TESTS: sqlite-php7.0-webdav-apache
ENABLE_REDIS: true
- DB: NODB - DB: NODB
PHP: 5.6 PHP: 5.6
ENABLE_REDIS: true
- DB: NODB - DB: NODB
PHP: 7.0 PHP: 7.0
ENABLE_REDIS: true
- DB: NODB - DB: NODB
PHP: 7.1 PHP: 7.1
ENABLE_REDIS: true
- DB: sqlite - DB: sqlite
PHP: 5.6 PHP: 5.6
ENABLE_REDIS: true
- DB: sqlite - DB: sqlite
PHP: 7.0 PHP: 7.0
ENABLE_REDIS: true
- DB: sqlite - DB: sqlite
PHP: 7.1 PHP: 7.1
ENABLE_REDIS: true
- DB: mysql - DB: mysql
PHP: 5.6 PHP: 5.6
ENABLE_REDIS: true
- DB: postgres - DB: postgres
PHP: 5.6 PHP: 5.6
ENABLE_REDIS: true
- DB: mysqlmb4 - DB: mysqlmb4
PHP: 5.6 PHP: 5.6
ENABLE_REDIS: true
services: services:
cache: cache:
image: redis image: redis
when:
matrix:
ENABLE_REDIS: true
postgres: postgres:
image: postgres image: postgres
environment: environment:

View File

@ -143,6 +143,10 @@ function cleanup_config {
if [ -f config/autotest-storage-swift.config.php ]; then if [ -f config/autotest-storage-swift.config.php ]; then
rm config/autotest-storage-swift.config.php rm config/autotest-storage-swift.config.php
fi fi
# Remove autotest redis config
if [ -f config/redis.config.php ]; then
rm config/redis.config.php
fi
# Remove mysqlmb4.config.php # Remove mysqlmb4.config.php
rm -f config/mysqlmb4.config.php rm -f config/mysqlmb4.config.php
} }
@ -178,6 +182,10 @@ function execute_tests {
fi fi
cp tests/preseed-config.php config/config.php cp tests/preseed-config.php config/config.php
if [ "$ENABLE_REDIS" == "true" ] ; then
cp tests/redis.config.php config/redis.config.php
fi
_DB=$DB _DB=$DB
# drop database # drop database

12
tests/redis.config.php Normal file
View File

@ -0,0 +1,12 @@
<?php
$CONFIG = [
'memcache.local' => '\\OC\\Memcache\\Redis',
'memcache.distributed' => '\\OC\\Memcache\\Redis',
'memcache.locking' => '\\OC\\Memcache\\Redis',
'redis' => [
'host' => 'localhost',
'port' => 6379,
'timeout' => 0,
],
];