]> git.mxchange.org Git - friendica.git/commitdiff
fix travis tests
authorPhilipp Holzer <admin@philipp.info>
Sat, 20 Apr 2019 16:11:24 +0000 (18:11 +0200)
committerPhilipp Holzer <admin@philipp.info>
Sun, 21 Apr 2019 10:45:46 +0000 (12:45 +0200)
.travis.yml
.travis/apcu.ini [new file with mode: 0644]
.travis/memcached.ini [new file with mode: 0644]
.travis/redis.ini [new file with mode: 0644]
tests/src/Core/Lock/APCuCacheLockDriverTest.php

index a241dff0fe365bc97401d07784a8cc130f61d127..e2aa84f5c81f91438475c579feb4064a770b2a0a 100644 (file)
@@ -19,7 +19,11 @@ before_script:
  - cp config/local-sample.config.php config/local.config.php
  - mysql -e 'CREATE DATABASE IF NOT EXISTS test;'
  - mysql -utravis test < database.sql
- - echo "extension=redis.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
- - echo "extension=memcached.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
- - echo "apc.enable_cli = 1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
+ - pecl channel-update pecl.php.net
+ - pecl config-set preferred_state beta
+ - if [[ $TRAVIS_PHP_VERSION != "7.1" ]]; then echo yes | pecl upgrade apcu; fi
+ - if [[ $TRAVIS_PHP_VERSION != "7.1" ]]; then phpenv config-add .travis/apcu.ini; fi
+ - phpenv config-add .travis/redis.ini
+ - phpenv config-add .travis/memcached.ini
+
 after_success: bash <(curl -s https://codecov.io/bash)
diff --git a/.travis/apcu.ini b/.travis/apcu.ini
new file mode 100644 (file)
index 0000000..9259866
--- /dev/null
@@ -0,0 +1,4 @@
+extension="apcu.so"
+
+apc.enabled = 1
+apc.enable_cli = 1
\ No newline at end of file
diff --git a/.travis/memcached.ini b/.travis/memcached.ini
new file mode 100644 (file)
index 0000000..c9a2ff0
--- /dev/null
@@ -0,0 +1 @@
+extension="memcached.so"
\ No newline at end of file
diff --git a/.travis/redis.ini b/.travis/redis.ini
new file mode 100644 (file)
index 0000000..ab995b8
--- /dev/null
@@ -0,0 +1 @@
+extension="redis.so"
\ No newline at end of file
index 7b0137e3682113c580fae8c5057f9267dd507502..6e185d6b9ad68995024499b9f003045f0c1d3952 100644 (file)
@@ -8,6 +8,15 @@ use Friendica\Core\Lock\CacheLockDriver;
 
 class APCuCacheLockDriverTest extends LockTest
 {
+       protected function setUp()
+       {
+               if (!APCuCache::isAvailable()) {
+                       $this->markTestSkipped('APCu is not available');
+               }
+
+               parent::setUp();
+       }
+
        protected function getInstance()
        {
                return new CacheLockDriver(new APCuCache());