]> source.dussan.org Git - nextcloud-server.git/commitdiff
Add redis support to our CI jobs 5732/head
authorMorris Jobke <hey@morrisjobke.de>
Tue, 2 May 2017 15:44:54 +0000 (12:44 -0300)
committerMorris Jobke <hey@morrisjobke.de>
Sun, 16 Jul 2017 08:38:16 +0000 (10:38 +0200)
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
.drone.yml
autotest.sh
tests/redis.config.php [new file with mode: 0644]

index 547a7ef0cec451af838f269fe553a5806ab3deb3..43f185678f6e5807619e9ea92b31ab4b69a276d7 100644 (file)
@@ -214,28 +214,41 @@ matrix:
     - TESTS: carddavtester-old-endpoint
     - DB: NODB
       PHP: 5.4
+      ENABLE_REDIS: true
     - DB: NODB
       PHP: 5.5
+      ENABLE_REDIS: true
     - DB: NODB
       PHP: 5.6
+      ENABLE_REDIS: true
     - DB: NODB
       PHP: 7.0
+      ENABLE_REDIS: true
     - DB: sqlite
       PHP: 5.4
+      ENABLE_REDIS: true
     - DB: sqlite
       PHP: 5.5
+      ENABLE_REDIS: true
     - DB: sqlite
       PHP: 5.6
+      ENABLE_REDIS: true
     - DB: sqlite
       PHP: 7.0
+      ENABLE_REDIS: true
     - DB: mysql
       PHP: 5.6
+      ENABLE_REDIS: true
     - DB: postgres
       PHP: 5.6
+      ENABLE_REDIS: true
 
 services:
   cache:
     image: redis
+    when:
+      matrix:
+       ENABLE_REDIS: true
   postgres:
     image: postgres
     environment:
index be65ae165a138a482dbc4094fbe2a98a96e4f84d..a90376e4c0eeb056b120ee5abeaa10af8429f25f 100755 (executable)
@@ -143,6 +143,10 @@ function cleanup_config {
        if [ -f config/autotest-storage-swift.config.php ]; then
                rm config/autotest-storage-swift.config.php
        fi
+       # Remove autotest redis config
+       if [ -f config/redis.config.php ]; then
+               rm config/redis.config.php
+       fi
 }
 
 # restore config on exit
@@ -176,6 +180,10 @@ function execute_tests {
        fi
        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
 
        # drop database
diff --git a/tests/redis.config.php b/tests/redis.config.php
new file mode 100644 (file)
index 0000000..9d3f1ec
--- /dev/null
@@ -0,0 +1,12 @@
+<?php
+
+$CONFIG = [
+       'memcache.local' => '\\OC\\Memcache\\Redis',
+       'memcache.distributed' => '\\OC\\Memcache\\Redis',
+       'memcache.locking' => '\\OC\\Memcache\\Redis',
+       'redis' => [
+               'host' => 'cache',
+               'port' => 6379,
+               'timeout' => 0,
+       ],
+];